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
Get step-by-step solutions from verified subject matter experts
