Question: In the code below, arr is an array of integers. Suppose we execute the code below: int* ptr; for( int i=0; i <10; i++ )
In the code below, arr is an array of integers. Suppose we execute the code below:
int* ptr;
for( int i=0; i<10; i++ )
{
arr[i] = i^2;
}
ptr = arr;
If arr[0] is stored at address 2400 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[2] :
*ptr :
ptr+1 :
*(ptr+1) :
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
