The essential difference with respect to getc and fgetc and getchar of

Personal understanding

Simply put getc is input from the keyboard, but is equivalent to read from the file. (Equivalent to the character to be entered from the keyboard on file in the first place to get this data from the file)

But yet getchar standard input (corresponding to input directly from the keyboard), with respect to getc, fewer intermediate steps.

The fgetc function is completely read from the file.

Guess you like

Origin www.cnblogs.com/xxzzxx/p/11986651.html