replaced scanf with fscanf.

This commit is contained in:
Pushkar Sharma 2015-10-05 00:52:47 +05:30
parent c7e552c448
commit 2e987df422

View File

@ -131,7 +131,7 @@ int main(void) {
// time constant: // time constant:
printf("Enter the array size: "); // ask the user for an array size printf("Enter the array size: "); // ask the user for an array size
int size; int size;
scanf("%d", &size); fscanf(stdin, "%d", &size);
char buf[size]; char buf[size];
fgets(buf, sizeof buf, stdin); fgets(buf, sizeof buf, stdin);