Question: In the code below, arr is an array of integers. Suppose we execute the code below: int* ptr; for( int i=0; i { arr[i] =
In the code below, arr is an array of integers. Suppose we execute the code below:
int* ptr;
for( int i=0; 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) :
In the code below, arr is an array of integers. Suppose we execute the code below: int* ptr; for(int i=0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
