C fputc() and fgetc()Writing File : fputc() functionThe fputc() function is used to write a single character into file. It outputs a character to a stream. Syntax: Example: file1.txt a Reading File : fgetc() functionThe fgetc() function returns a single character from the file. It gets a character from the stream. It returns EOF at the end of file. Syntax: Example: myfile.txt this is simple text message
Next TopicC fputs() and fgets()
|