home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_11 / 610.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-19  |  586KB  |  2550x3300
Labels: book | crt screen | daybook | poster | reckoner
OCR: 610 Chapter 1 C Library and Preprocessor Facilities PRECOND ITION: none POSTCONDITION: processit) is stub functi on int main( int argc, char *argv[] FILE fp, char buf [BUF SIZE]; pri intf "Usage: perror file\n"); exit " fopen( fopen argv[1], error" "r" )) == NULL Note perror( while fread( buf, sizeof char ), BUF SIZE, Fn processit(, ferror( fp )) Note perror( argv[1] Note clearerr( Note Processing may conti inue return 0 ************** processit) void processit( void printf( "File process ing stub. \n" ); The program consists of two functions. main and processit (. The function proce stub 11 symbolizes processing that might be done on each block of characters from the file The function main() uses statements T check for the correct number of command line arguments open the file, and check ...