summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
authorSean Corrales <scorrales@gmail.com>2015-10-05 09:50:44 -0500
committerSean Corrales <scorrales@gmail.com>2015-10-05 09:50:44 -0500
commitfe5157d36f4b508479edaa214e097f65e7ba26e1 (patch)
treee6a3f377ba4ed7735bbcf3c2908082b811168e9e /c.html.markdown
parenta743c831a07f5e846051b156152fe8e6ddcfb097 (diff)
parente57fb68756ec6f4242ad04c359f7796606b52a42 (diff)
Merge pull request #1 from adambard/master
Merging changes from source branch
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