Question: write the exact output of the following code box: A) // memory address of p is 1000 // memory address of a is 1004 //

write the exact output of the following code box:

A)

// memory address of p is 1000

// memory address of a is 1004

// memory address of b is 1008

Int *p;

Int a =15;

Int b =20;

P=a;

*p=b;

Cout << a << endl;

B)

// memory address of p is 1000

// memory address of a is 1004

// memory address of b is 1008

Int *p;

Int a =15;

Int b =20;

P=a;

*p=b;

Cout << *p << endl;

C)

// memory address of p is 1000

// memory address of a is 1004

// memory address of b is 1008

Int *p;

Int a =15;

Int b =20;

P=a;

*p=b;

Cout << p << endl;

D)

// memory address of p is 1000

// memory address of a is 1004

// memory address of b is 1008

Int *p;

Int a =15;

Int b =20;

P=a;

*p=b;

Cout << &p << endl;

E)

// memory address of p is 1000

// memory address of dynamic int array is 2000

Int *p;

P=new int[5];

For (int i = 0; i<5; ++i)

P[i]= 5 - i;

Cout << &(p[2])<< endl;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!