Exercises
-
8.7 (True or False) State whether the following are true or false. If false, explain why.
Two pointers that point to different built-in arrays cannot be compared meaningfully.
Because the name of a built-in array is implicitly convertible to a pointer to the first element of the built-in array, built-in array names can be manipulated in the same manner as pointers.
-
8.8 (Write C++ Statements) For each of the following, write C++ statements that perform the specified task. Assume that unsigned integers are stored in four bytes and that the starting address of the built-in array is at location 1002500 in memory.
Declare an
unsigned
int
built-in arrayvalues
with five elements initialized to the even integers from 2 to 10. Assume ...
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.