To tylko jedna z 2 stron tej notatki. Zaloguj się aby zobaczyć ten dokument.
Zobacz
całą notatkę
Line buffered input Each line input is stored in a buffer Problems can arise when a program does not process all the data in a line, before it wants to process the next line of input Consider the following code: int x; char st[31]; printf("Enter an integer: "); scanf("%d", &x); printf("Enter a line of text: "); fgets(st, 30, stdin); The fgets() will not read the line of text that is typed in Instead, it will probably just read an empty line In fact, the program will not even wait for an input for the fgets() call
... zobacz całą notatkę
Komentarze użytkowników (0)