home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_05 / 289.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  708KB  |  2550x3300
Labels: book | reckoner
OCR: Input and Output of Strings 289 return extra whi tes; countem) int count em( char **ptr Note 6 int counter while *otr Note 7 count ptr Note 8 return( counter The program consists of the functions main, process ine 1 and countem {) The code in main {) consists of a whi loop and function calls. Each pass through the whi le loop handles one line of input. The function process line { looks at the input. one character time and counts any blanks The function countem is called only when blank character IS found in the input array counts the number of blanks a that location and advances the pointer to the next nonblank character in the array Note 1. The function declarations indicate how these functions communicate with each other and ma. The function process ine takes pointer to the beginning of ...