home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / _ANSWERS_ / 21.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-19  |  578KB  |  2550x3300
Labels: book | crt screen | reckoner | sky
OCR: Chapter 10 17 To allocate room for the terminating null character Changes: Declare FILE variable for the output file. FILE fpout, Add code to open the file when argc 13.3 and substitute stdout when it is not 3 argo fpout "w" NULL fopen( arqv[2] printf "Unable to open argv[2] exit else fpout stdout, Change the output statements to access fpout instead lofstdout. while fgets( ina rray, NUMCHARS NULL fpr intf( fpout d necount fputs( na fpout 22 fwrite( zeof( struct trans fp 1r fwri te array, sizeof array fD read trans struct trans *trans ptr, FILE at return ptr sizeof *trans ptr fp fread( trans ad 29 Yes the only change necessary to the prntscan.c is in the final loop: while fscanf( fp, irst, last &gpa fpr: intf name tp iast fprintf( edb fp, gpa The space between hi and7 terminates the string ...