Question: Practice Pointers Complete the following diagrams and code so that they all correspond to each other: void someFunction ( ) { int i = int

Practice Pointers
Complete the following diagrams and code
so that they all correspond to each other:
void someFunction(){
int i =
int j =44;
int *p1= &
int *p2; //at addr 0xFC0100EC
What is p1s value?
Write the code to display p1s pointees value.
Write the code to display p1s value.
Is it useful to know a pointers exact value?
What is p2s value?
Basic Diag:
22
i
p1
j
p2
Write the code to initialize p2 so that it points to nothing.
What happens if the code below executes when p2 is NULL?
printf("%i
",*p2);
Linear Diag:
0xFC0100F8
0xFC0100F0
What happens if the code below executes when p2 is uninitialized?
printf("%i
",*p2);
Write the code to make p2 point to i.
How many pointer variables are declared in the code below?
void someFunction(){
int* p1, p2;
What does the code below do?
int **q = &p1;
00
00
00
16
00
00
00
2C
FC
01
00
F4
?
?
?

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!