home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / clesson / c.dir / 00168_c6.pcx.png < prev    next >
Portable Network Graphic  |  1995-04-05  |  10.1 KB  |  490x212  |  4-bit (6 colors)
   ocr: The variable iis initially assigned the value 0. Then - getchar()" gets a character from the keyboard, assigns it to "c",and tests to see ifit is a newline character. If o it is not, the body of the "for" loop is executed. The value of"c"is assigned to the aray element "nameli]. Macro "isalpha()" is used to determine whether "c" is a lower- or uppercase letter. "sum" is incremented by the value of"c" ifitis.