Question: In the code below, arr is an array of integers. Suppose we execute the code below: C PROGRAMMING C PROGRAMMING int* ptr; for( int i=0;

In the code below, arr is an array of integers. Suppose we execute the code below:

C PROGRAMMING C PROGRAMMING

int* ptr;

for( int i=0; i<10; i++ )

{

arr[i] = i+1;

}

ptr = arr;

If arr[0] is stored at address 3000 after executing the above code, what is the value of each of the following expressions? Dont worry about the hexadecimal representation, use normal decimal numbers and simple addition.

arr : ...

&arr[6] :

*ptr :

ptr+3 :

*(ptr+3) :

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!