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 / 231.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-11  |  722KB  |  2550x3300
Labels: book | reckoner
OCR: Passing Parameters to Functions 231 Learning Activities Modify arrayptr.c by attempting assign value to demoarray after the for loop (or try to use the increment by operator on demoa rray) This is an error because the array cannot be moved in memory during execution (demoarray is constant value) How does your system handle this error? Is it caught at compile time at runtime or not caught at all? Toward Efficiency The last example showed that (demoarray i demoarray[i] and demoptr refer to the same quantity. Most programmers are more comfortable with the notation demoarray(i because this syntax is similar to that used to access array elements in many other languages. However, in c the express ion demoptr is the most efficient of the three expressions to access an element n an array of ints, ...