Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For each of the following, write C++ statements that perform the specified task.

ID: 3657672 • Letter: F

Question

For each of the following, write C++ statements that perform the specified task. Assume that SIZE has been defined as 5. Must use SIZE wherever a size is required. Also assume that unsigned integers are stored in 2 bytes and that the base address of the array is at location 1002500 in memory. 1. Using vPtr with base/offset notation display the elements of array values. 2. Refer to the fifth element of values using array subscript notation, base /offset notation with the array name as the pointer, array notation with vPtr, and base /offset notation with vPtr. 3. What address is referenced by vPtr + 3? (This means the actual memory address) What value is stored at that location?

Explanation / Answer

answer-1int arr[SIZE]={2,4,5,6,7}; int *vPtr=arr; for(int i=0;i