##### Module 4

[Back to Class 1 Prep](../../class1-prep#pointers)

# Exercise: Pointer Practice

You are given the following values:

```c
int x = 7;
int y = 2;
int z = 9;
int* px = &x;
int* py = &y;
int* pz = &z;

Fill in the table below with the values that each variable will have after each statement is executed.

Statement | x | y | z | px | py | pz 
----------|---|---|---|----|----|----
y = x + z; | ? | ? | ? |  ? |  ? |  ?
z = *x + 2;| ? | ? | ? |  ? |  ? |  ?
*px = (*py) + (*pz);| ? | ? | ? |  ? |  ? |  ?
py = pz;| ? | ? | ? |  ? |  ? |  ?
z = (*pz) + x;| ? | ? | ? |  ? |  ? |  ?
*py = x + y;| ? | ? | ? |  ? |  ? |  ?
z = (*pz) * (*py);| ? | ? | ? |  ? |  ? |  ?

##### Module 4

[Back to Class 1 Prep](../../class1-prep#pointers)

# Exercise: Pointer Practice

You are given the following values:

```c
int x = 7;
int y = 2;
int z = 9;
int* px = &x;
int* py = &y;
int* pz = &z;
```

Fill in the table below with the values that each variable will have after each statement is executed.

Statement | x | y | z | px | py | pz 
----------|---|---|---|----|----|----
y = x + z; | ? | ? | ? |  ? |  ? |  ?
z = *x + 2;| ? | ? | ? |  ? |  ? |  ?
*px = (*py) + (*pz);| ? | ? | ? |  ? |  ? |  ?
py = pz;| ? | ? | ? |  ? |  ? |  ?
z = (*pz) + x;| ? | ? | ? |  ? |  ? |  ?
*py = x + y;| ? | ? | ? |  ? |  ? |  ?
z = (*pz) * (*py);| ? | ? | ? |  ? |  ? |  ?

Fix code block in pointer practice
Fix code block in pointer practice
