Question: Given these variable declarations; int c = 20; // c is located at address 2000 int f = 40; // f is located at address
Given these variable declarations;
int c = 20; // c is located at address 2000
int f = 40; // f is located at address 2004
int *aPtr; // aPtr is located at address 2008
int h[3]= {5, 10, 15}; // h is located at address 2012, the contents of the array come right after
For each statement below , provide a brief explanation of what happens to any of the variables defined above, CLEARLY SHOWING HOW ANY AFFECTED VARIABLES CHANGE BY LISTING THEIR OLD VALUE AND THE NEW VALUE THEY WILL HAVE. Refer to the statement number in the comment when writing your answers.
The program statements below are executed in sequence, the second after the first, the third after the second, etc.
aPtr = &c; // #1
f = *aPtr; // #2
*aPtr = 33; // #3
aPtr = &h[2]; // #4
*aPtr = 22; // #5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
