diff options
author | Zachary Ferguson <zfergus2@users.noreply.github.com> | 2015-10-06 18:19:20 -0400 |
---|---|---|
committer | Zachary Ferguson <zfergus2@users.noreply.github.com> | 2015-10-06 18:19:20 -0400 |
commit | c4f93c0b0ec1fcea11e336b67929b9d6f426765c (patch) | |
tree | a97e9f7a56330e45122bb81bb5194f2aefe03fdb /c.html.markdown | |
parent | 29cbff176857653422555650c983afef4a28ae1f (diff) | |
parent | 55c80f255202b03c4c3a66ac1d37f880a3782b68 (diff) |
Merge remote-tracking branch 'adambard/master'
Conflicts:
java.html.markdown
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 |