Q:

The result of adding an integral value to a pointer must be a pointer to an element in the same array, or a pointer just past the end of the array

0

The result of adding an integral value to a pointer must be a pointer to an element in the same array, or a pointer just past the end of the array.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

// ok: arr is converted to a pointer to its first element; p points one past the end of arr
int *p = arr + sz; // use caution -- do not dereference!
int *p2 = arr + 10; // error: arr has only 5 elements; p2 has undefined value

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now