diff options
author | Vojta Svoboda <vojtasvoboda.cz@gmail.com> | 2015-10-07 14:26:18 +0200 |
---|---|---|
committer | Vojta Svoboda <vojtasvoboda.cz@gmail.com> | 2015-10-07 14:26:18 +0200 |
commit | bff40e2f9816974abd29322f2a50455f51acd22e (patch) | |
tree | 01177dd231841fea5dea3aa6546fde8d6630f5d3 /c.html.markdown | |
parent | 6dabd9568d2a99e7bbc079d0466588bf68a42283 (diff) | |
parent | 5c677e8071291520297ef3d5d8374c6d11285744 (diff) |
Merge branch 'master' into translation/brainfuck-cs
Diffstat (limited to 'c.html.markdown')
-rw-r--r-- | c.html.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/c.html.markdown b/c.html.markdown index 8e631de4..db2ac930 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -130,7 +130,9 @@ int main(void) { // can be declared as well. The size of such an array need not be a compile // time constant: printf("Enter the array size: "); // ask the user for an array size - char buf[0x100]; + int size; + fscanf(stdin, "%d", &size); + char buf[size]; fgets(buf, sizeof buf, stdin); // strtoul parses a string to an unsigned integer |