Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given these variable declarations; int c = 20; // c is located at address 2000 int f = 40; // f is located at address

Given these variable declarations;

int c = 20; // c is located at address 2000

int f = 40; // f is located at address 2004

int *aPtr; // aPtr is located at address 2008

int h[3]= {5, 10, 15}; // h is located at address 2012, the contents of the array come right after

For each statement below , provide a brief explanation of what happens to any of the variables defined above, CLEARLY SHOWING HOW ANY AFFECTED VARIABLES CHANGE BY LISTING THEIR OLD VALUE AND THE NEW VALUE THEY WILL HAVE. Refer to the statement number in the comment when writing your answers.

The program statements below are executed in sequence, the second after the first, the third after the second, etc.

aPtr = &c; // #1

f = *aPtr; // #2

*aPtr = 33; // #3

aPtr = &h[2]; // #4

*aPtr = 22; // #5

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

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions