Question: Given the array int arr[] = {2,4,6,8,10,12,14}, answer the following questions a. Declare a pointer aPtr to point to arr b. Assuming aPtrs address is
Given the array int arr[] = {2,4,6,8,10,12,14}, answer the following questions
a. Declare a pointer aPtr to point to arr
b. Assuming aPtrs address is 0X1234 and arrs address is 0x2344, answer the following
i. cout< ii.cout<<*aPtr; iii.cout< iv.cout<<*aPtr + 2; v.cout<<*(aPtr+4); vi.cout<<&aPtr+2; c. Write a loop to display all the values in arr using aPtr and pointer arithmetic Please answer my question thank you! I need the answers in c++.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
