home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_10 / 574.jpg < prev    next >
Joint Photographic Experts Group Image  |  2014-01-29  |  753KB  |  2550x3300
Labels: book | crt screen | reckoner | wordbook
OCR: 574 Chapter Input and Output Note 2 The standard library function fgets is used to do the input. It will return NULL pointer in the case of cither an or the end of the input file returns pointer to the input buffer, in if no error encountered. The parameters to fgets are the address of the input the buffer, input the file number fgets of will characters stop in the reading buffer either and when the FILE reads a pointer new line for character or when it has filled the buffer and terminated the string with null character. Note call to fputs() prints each line It takes two parameters the address of the destination buffer and the FILE pointer for the output file Learning Activities Compile and run nl.c to ensure that 1 works on your system. Test the program with several different sets of inpu ...