Labels:book | crt screen | monitor | reckoner OCR: 586 Chapter Input and Output printf "Unable to open input file. in" ); exit Open output files and report any errors name fopen( "names NULL print f. "Unable open names n" exit if (( gpa fp fopen( "gpas", "w" == NULL printf "Unable .0 open edb file In" exit( while fgets( inbuff, BUF SIZE, fp NULL Note sscanf( inbuff, %lf%*c first, last, &gpa Note 2 fpri intf( name fp, %s\n" last, first fprintf( gpa fp, 114 In" gpa fc lose fci lose name fp fc. Lose gpa fp return 0; This program consists of a single function. main The three if statements open the input file ud info, and the two output files, names and gpas. If an error occurs while opening any of the files an error message 19 issued and the pro- gram terminates The whi ile loop processes the contents of the input file Each iteration of the lo ...