Question: 5C Pointers Part A: Fill in blanks 1. Suppose the allocated addresses for variable x, y, and pt are as follows after declaration: x: 300

5C Pointers

Part A:

Fill in blanks

1. Suppose the allocated addresses for variable x, y, and pt are as follows after declaration:

x: 300

y: 296

pt: 292 and we are executing the following code sequence. Write down the values of x, y, and pt at each step. You may verify your answer in C (address will be different but they should be consistent).

x y pt why?

int x =1; y =2;

int *pt;
pt = &x;
y = *pt;
x = pt;
*pt = 5
pt = &y;
*pt = x * x;

submit the following two items from the rest:

  1. C program, and
  2. A screenshot showing the output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!