Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions