summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPushkar Sharma <thepsguy@icloud.com>2015-10-05 00:52:47 +0530
committerPushkar Sharma <thepsguy@icloud.com>2015-10-05 00:52:47 +0530
commit2e987df42225e6bdf824584058467aaffc73fb49 (patch)
tree9b1132ed112e47395465ada9b026fc3b4824a785
parentc7e552c448c5a562a3ff5f442a7ed834aec04d9e (diff)
replaced scanf with fscanf.
-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);