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 / 210.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-11  |  673KB  |  2550x3300
Labels: book | reckoner | shelf
OCR: 210 Chapter Arrays and Pointers Learning Activities Many beginning c programmers are tempted to put the number of elements in the array into the parameter declarations when an array IS passed as an argument to a function. Modify arraypar.c by changing both parameter declarations of the array inventory include the number of cells Make both decl arations read int inventory [20] Attempt to compile and run the program. What did you discover? If it runs correctly, compare the size of the executable versions of the code Compare the contents of the two executable files. What conclusions, if any can you draw? (On most systems the 20 will be ignored and the two versions will be identical Does this happen on your system?) Write function that will sum the elements in an array of ints. Have your funct ...