GETS(3) Linux Programmer’sManual GETS(3) NAME fgetc, fgets, getc, getchar ,gets, ungetc - input of characters and strings SYNOPSIS #include <stdio.h> int fgetc(FILE * stream ); char *fgets(char * s ,int size ,FILE * stream ); int getc(FILE * stream ); int getchar(void); char *gets(char * s ); int ungetc(int c ,FILE * stream ); DESCRIPTION fgetc() reads the next character from stream and returns it as an unsigned char cast to an int ,or EOF on end of file or error. getc() is equivalent to fgetc() except that it may be implemented as a macro which evaluates stream more than once. getchar() is equivalent to getc( stdin ) . gets() reads a line from stdin into the buffer pointed to by s until either a terminating newline or EOF , which it replaces with ’\0’ .Nocheck for buffer overrun is performed (see BUGS below). fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s .Reading stops after an EOF
This is the end of the preview.
access the rest of the document.
ASCII, Carriage return, Input/output, Stdio.h, Standard streams