home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_07 / 386.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-20  |  617KB  |  2550x3300
Labels: book | crt screen | poster | reckoner | screen
OCR: 386 Chapter Structuring the Data Example 7-2 demonstrates the storage of a structure in memory. It uses the izeof operator and the address operator on variable of a structure type and displays information about ito structure variables Example 7-2: stradd.c stradd Synopsis Displays the sizeof() structure and the addresses of two structure vari iables and their members tqo iective To demons trate the layout of structure in memory Incl lude files incl Lude stdio b Const ant Definiti ions #de fine SSN LGTH #de fine LINI LGTH Type Descript ions struct empl Note 1 char ssn ISSN LGTH] char ini tials [INIT LGTH float rate, float hours int main void struct empl due oyeel, employee2; Note printf( "si zeo (struct empl) is sd. In" sizeof( st ruct empl printf( "employeel located at \n' &emp Loyeel pri ...