mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
replaced scanf with fscanf.
This commit is contained in:
parent
c7e552c448
commit
2e987df422
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user