Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

What are the boundaries for the expected return of a portfolio?

Answered: 1 week ago