00:01
In this question, we have to give memory snapshots of the variables that are given to us.
00:14
Like this.
00:16
So, we have to give memory snapshots of all variables after following the statements that are executed.
00:23
So, the pointer variables and the variables that follow the statements that are executed.
00:30
All those are given to us in the question.
00:33
So, we will just see in a basic compiler how we are going to proceed with this as everything is given to us in the question.
00:42
So, we just have to follow that.
00:45
So, first of all, we will, first state of statements that are there will be like this.
00:53
So, here what is done is we have declared three integer variables that is x, y and z.
01:04
So, as you can see, we have initialized x with the value of 5 and y with the value of 7 and z is left uninitialized.
01:18
So, this second line that you can see, there are three integer points that is ptr1, ptr2 and ptr3 are declared over here.
01:27
So, ptr1 is initialized with the address of y and ptr2 is initialized with the address of z and 3 with the address of both of these are initialized with the address of z as you can.
01:42
So, ptr2 is equal to x this assigns the value of x that is 5 to the variable z.
01:49
So, indirectly through the pointer of 2, now z will become 5.
01:55
So, the next set of values that we set is x is equal to ptr1 plus 2 plus 3.
02:03
Here what we have done is the value of x is updated by adding the values pointed to by ptr1 2, 3.
02:13
So, x will become 7 plus 5 that is and also another 5...