1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-01-17 21:49:22 +01:00
This commit is contained in:
muxueqz 2020-06-13 20:20:20 +08:00 committed by GitHub
parent ef04802863
commit 83d35fb28a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ printf("Enter the array size: "); // 询问用户数组长度
char buf[0x100];
fgets(buf, sizeof buf, stdin);
// stroul 将字符串解析为无符号整数
// strtoul 将字符串解析为无符号整数
size_t size = strtoul(buf, NULL, 10);
int var_length_array[size]; // 声明VLA
printf("sizeof array = %zu\n", sizeof var_length_array);