1, gets () and puts ()(1) Get (): Gets a string from the system's standard input device, reads all character usages before the newline character (excluding line breaks): char *
gets( ); The Get () function accepts a string address as a parameter, the read succeeds returns the address of the read-in string, the read failure returns a null pointer null, (2) puts (): Outputs a string to stdout, and the string output is completed automatically adds a newline usage: int
puts(char *string);
2, Fgets () and fputs ()(1) fgets (): Reads a string from the stream usage: char *
fgets(char *string, int n, FILE *stream); (2) fputs (): write string to file stream usage: int
fputs(Char *string, FILE *stream);
3, Getc () and PUTC ()(1) getc (): reads a character from a file usage: int
getc(FILE *stream); (2) PUTC (): Write a character to the file usage: int
PUTC(char C, FILE *stream);
4, GetChar () and Putchar ()(1) GetChar (): Get a character from a standard input device usage: int
GetChar(void); (2) Putchar (): output one character to standard output usage: extern void
Putchar(char c);
5, scanf () and printf ()(1) scanf (): Format input function usage: int
scanf(char *format[,argument,...]) ; Returns the number of successful read-in elements; (2) printf (): Formatted output function usage: extern int
printf(const char *format,...); Returns the number of output characters
6, fscanf () and fprintf ()(1) fscanf (): Perform formatting input usage from a stream: int
fscanf(FILE *stream, char *format[,argument ...]) ; (2) fprintf (): Transfer formatted output to a stream usage: int
fprintf(FILE *stream, char *format[, argument,...]);
C-language I/O functions Summary