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 / 277.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  688KB  |  2550x3300
Labels: book | reckoner | shelf
OCR: Variable Strings 277 can be done in two ways: using pointer arithmetic and array notation. The assignment statement done with pointer arithmetic, places new line immediately after the "two" The comma over- Note written Note Note The second ass ignment statement uses array subscripting and places 0 after the newline to terminate the string at this point The follow- the ing call .nt displays the modified string. Output stops first null character Note that both subscripting and pointer arithmetic can be utilized to access memory locations within the string stored an array Recall that the name of an array evaluates to the address of the first element in the array Learning Activities Replace the line char work stringl 512 "One two, buckle my shoe n with the two lines char work stringl 512 1 ati ...