home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_04 / 254.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-11  |  580KB  |  2550x3300
Labels: book | crt screen | monitor | reckoner
OCR: 254 Chapter Arrays and Pointers After this dynamic allocation, the five integer memory location can be accessed using the array indexing syntax Figure 4-8 shows the memory configu H ration and shows the name 01 each memory location inc inc Array of ints allocated by melloc) void intarray void intarray[0] intarray[] intarray 2 intarray[3] intarray 4 voi Figure 4-8 The syntax int array [2] is an int and can be used in any expression where any other int can It can be used assignment statements: intarray 12 in arithmetic expressions: .nt intarray[2] 10 any other expression involving an int. In the program frequency.c in Example 4.16 mal loc is used to allocate space for an array of type int After allocation, the memory can be accessed with the array index notation Example 4.16 frequency.c freg ...