summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--c.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 36621a9e..db2ac930 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -131,7 +131,7 @@ int main(void) {
// time constant:
printf("Enter the array size: "); // ask the user for an array size
int size;
- scanf("%d", &size);
+ fscanf(stdin, "%d", &size);
char buf[size];
fgets(buf, sizeof buf, stdin);