Friday, November 4, 2011

Writing to a File in C programming language

The fputc( ) function is similar to the putch( ) function, in the sense that both output characters. However, putch() function always writes to the VDU, whereas, fputc( ) writes to the file. Which file? The file signified by ft. The writing process continues till all characters from the source file have been written to the target file, following which the while loop terminat
Note that our sample file-copy program is capable of copying only text files. To copy files with extension .EXE or .COM, we need to open the files in binary mode, a topic that would be dealt with in sufficient detail in a later section.es

No comments:

Post a Comment