Question: 7. Consider this short code segment: int vals[] = {4, 7, 11}; int *valptr; valptr = vals; Are all four of the following statements equivalent?
7. Consider this short code segment: int vals[] = {4, 7, 11}; int *valptr; valptr = vals; Are all four of the following statements equivalent? vals[2] = 17; valptr[2] = 17; *(vals + 2) = 17; *(valptr + 2) = 17; A. Yes B. No
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
