Consider the following code: int x = 0x2020; int *y = &x; int **z = &y; *y += 8; int w = **z; Suppose the compiler puts x at address 0x2000, y at address 0x2008, z at address 0x2010, and w at address 0x2018. Use this code to answer the next questions. What value is in y after the code above runs? A. 0x2000 B. 0x2008 C. 0x2010 D. 0x2018 E. 0x2020 F. 0x2028 G. 0x2030 What value is in z after the code above runs? A. 0x2000 B. 0x2008 C. 0x2010 D. 0x2018 E. 0x2020 F. 0x2028 G. 0x2030 What value is in w after the code above runs? A. 0x2000 B. 0x2008 C. 0x2010 D. 0x2018 E. 0x2020 F. 0x2028 G. 0x2030

Oh no! Our experts couldn't answer your question.

Don't worry! We won't leave you hanging. Plus, we're giving you back one question for the inconvenience.

Submit your question and receive a step-by-step explanation from our experts in as fast as 30 minutes.
You have no more questions left.
Message from our expert:
Our experts are unable to provide you with a solution at this time. Try rewording your question, and make sure to submit one question at a time. We've credited a question to your account.
Your Question:

Consider the following code:

int x = 0x2020;
int *y = &x;
int **z = &y;
*y += 8;
int w = **z;

Suppose the compiler puts x at address 0x2000, y at address 0x2008, z at address 0x2010, and w at address 0x2018.

Use this code to answer the next questions.

What value is in y after the code above runs?

A. 0x2000
B. 0x2008
C. 0x2010
D. 0x2018
E. 0x2020
F. 0x2028
G. 0x2030

What value is in z after the code above runs?

A. 0x2000
B. 0x2008
C. 0x2010
D. 0x2018
E. 0x2020
F. 0x2028
G. 0x2030

What value is in w after the code above runs?

A. 0x2000
B. 0x2008
C. 0x2010
D. 0x2018
E. 0x2020
F. 0x2028
G. 0x2030
 
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr