Question: Determine the state of memory after the following code segment. You should give the value for each declared variable. Use ampersands for pointers (arrows optional).
Determine the state of memory after the following code segment. You should give the value for each declared variable. Use ampersands for pointers (arrows optional). Use a question mark as the value for uninitialized variables (i.e. ones that havent been set in this code).
void fun(int* x, int* y, int** z) { *y = 127 *z = x; y = x; //WHAT DOES MEMORY LOOK LIKE WHEN YOU REACH HERE } int a = 141;
int b = 142; int* c = &b; fun(&a, c, &c));
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
