summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
authorIan Bertolacci <ian.bertolacci@gmail.com>2015-10-04 22:02:33 -0600
committerIan Bertolacci <ian.bertolacci@gmail.com>2015-10-04 22:02:33 -0600
commita9680e9c02a9490549b6939f7cb16fa88a880538 (patch)
treeaf81bebcd9b564dce72f213fe14a17fe4b9032b2 /c.html.markdown
parent57ea4af17c7ab17e9c32096c2579e0a985e44781 (diff)
parentad4d6f3c1e9dfba3933651116535d590a17092df (diff)
Merge branch 'master' of github.com:adambard/learnxinyminutes-docs
Fixed down merge-conflict.
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown4
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