1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vinil7 [7]
3 years ago
5

Consider the code fragment below. Show the values stored at each location in memory and as they change while the code executes.

Use the memory addresses given in the comments following each statement. Assume all integer and pointer sizes are four bytes and each box in the memory representation is 4 bytes.
int x; // x is at memory address 5000
int *y; // *y is at memory address 5004
int *z; // *z is at memory address 5008
int *a; // a is at memory address 5012
z=&x;
y=malloc(5 * sizeof(int)); // malloc returns
// address 6000
X = 10;
y[1] = 15;
y[2] = *z; x=*(y + 1);
a = malloc(sizeof(int)); // malloc returns // address 6020
*a = *y; a = z; *z= 25; *a = 12; y[3] = *z; y[4] = x; y[0] = x;
Computers and Technology
1 answer:
Nana76 [90]3 years ago
6 0

Answer:

see explaination

Explanation:

Final value :-

Memory => value = reference in code

5000 => 12 = x

5004 => 6000 = *y

5008 => 5000 = *z

5012 => 5000 = *a

6000 => 12 = y[0]

6004 => 15 = y[1]

6008 => 10 = y[2]

6012 => 12 = y[3]

6016 => 12 = y[4]

6020 =>

You might be interested in
When James added a date field to a PivotTable, Excel grouped the date values into quarters, months, and years. He does not want
ivanzaharov [21]

When James clicks the Remove button on the PivotTable Tools Analyze tab is a true statement.

<h3>What is PivotTable?</h3>

A PivotTable is known to be a kind of interactive method that is used to quickly make a summary of large amounts of data.

Note that this table is one that a person can use to analyze numerical data thoroughly and it is known to be one that answer quick and unplanned questions about one's data.

Note that one can  remove the set date field without having any effect on the year or quarter fields.

Learn more about PivotTable from

brainly.com/question/15214258

7 0
2 years ago
PLEASE DON'T DELETE THIS QUESTION!!!!
USPshnik [31]

you can only have one picture on here ¿¿¿¿¿¿¿¿¿¿¿¿¿

3 0
3 years ago
Read 2 more answers
Technician A says that to cover all possible vehicle conditions, coolant must have a high freezing point. Technician B says cool
tiny-mole [99]
It would be option A!
please mark me brainliest ,
8 0
2 years ago
Read 2 more answers
The central processing unit (CPU) processes the data in a computer systenpical data processing includes:
spin [16.1K]
Permoryin to, tho e k k j d
5 0
3 years ago
Which of the following sentences is accurate? a. PDF stands for "Proofreading Direct Files." b. PDF files cannot be edited. c. B
olga_2 [115]

Answer: Option (c) is correct

Explanation:

PDF is portable document format that come in form of file format .It is used for sharing and transmitting between computing and operating systems for viewing and printing in actual page layout. They can be used fro eBooks ,scanned document and text etc.

  • Other options are incorrect because not all business organization use PDF, PDF has the capability of being edited and it stands for "portable document format".
  • Thus, the correct option is option(c)
8 0
3 years ago
Other questions:
  • Launched in 1995, ________ has become the most popular web browser.
    6·1 answer
  • Populate a one-dimensional array with the following grades in this order: 90, 61, 74, 42, 83, 51, 71, 83, 98, 87, 94, 68, 44, an
    15·1 answer
  • Describe markings on a road that indicate that it is safe to pass.
    10·1 answer
  • Suppose there are two hosts, S and R. They are communicating over a TCP connection, and R has already received from S al bytes f
    11·1 answer
  • __________ are hosted on dedicated computers known as 'web servers'.​
    8·2 answers
  • Given two int variables , firstplacewinner and secondplacewinner, write some code that swaps their values . declare any addition
    11·1 answer
  • What is a common translator?​
    9·1 answer
  • Write the line of Python code that calculates and prints the answer to the following arithmetic expressions.
    7·1 answer
  • What is a database and provide 2 examples of how you are using a database.
    5·1 answer
  • Range paramters - for loop<br> question in picture
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!