Consider the following portion of memory. Each table cell is a memory location, which contains a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following portion of memory. Each table cell is a memory location, which contains a single byte, with values shown in hex, and the address of the leftmost byte on each row is shown to the left of the row. In this representation of memory, addresses increase as we move to the right and down in the table. Output: ? (a) [1 point] What are the contents of memory location 0x36ca22b89c in binary? (b) [1 point] What are the contents of memory location 0x36ca22b8aa in binary? For each of the following code snippets, which include printf statements, write down what would be printed out. In each part, assume that p is a pointer of type void that has the value 0x36ca22b898. (c) [1 point] (d) [1 point] int a = (int *)p; printf("x", (a+4)); Address Output: ? (e) [1 point] 0x36ca22b898 0x36ca22b8a0 0x36ca22b8a8 52 69 73 65 26 53 68 6f 75 74 00 52 6f 79 61 6c 2e 53 74 72 6f 6e 67 00 char b = (char *) p; printf("%c", * (b+9)); Output: ? (f) [1 point] char *c (char *)p; printf("%s", c); Output: ? long d = (long *)p; printf("%1x", (d+1)); Consider the following portion of memory. Each table cell is a memory location, which contains a single byte, with values shown in hex, and the address of the leftmost byte on each row is shown to the left of the row. In this representation of memory, addresses increase as we move to the right and down in the table. Output: ? (a) [1 point] What are the contents of memory location 0x36ca22b89c in binary? (b) [1 point] What are the contents of memory location 0x36ca22b8aa in binary? For each of the following code snippets, which include printf statements, write down what would be printed out. In each part, assume that p is a pointer of type void that has the value 0x36ca22b898. (c) [1 point] (d) [1 point] int a = (int *)p; printf("x", (a+4)); Address Output: ? (e) [1 point] 0x36ca22b898 0x36ca22b8a0 0x36ca22b8a8 52 69 73 65 26 53 68 6f 75 74 00 52 6f 79 61 6c 2e 53 74 72 6f 6e 67 00 char b = (char *) p; printf("%c", * (b+9)); Output: ? (f) [1 point] char *c (char *)p; printf("%s", c); Output: ? long d = (long *)p; printf("%1x", (d+1));
Expert Answer:
Answer rating: 100% (QA)
Lets address each part of your question a The contents of memory location 0x36ca2... View the full answer
Related Book For
Computer organization and architecture designing for performance
ISBN: 978-0136073734
8th edition
Authors: william stallings
Posted Date:
Students also viewed these operating system questions
-
Perform a risk assessment or information technology audit to determine your organization's unique information security needs.
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Azalea Seafood Gumbo Shoppe in 2004 John E, Gamble Urlif'CiNily OrS.01,11/7 Vahaina John Addison had just returned from lunch when his partner. Mike Rathle, remarked that Wal-Mart's weekly order for...
-
Should common costs be allocated?
-
Show that a graph has a unique minimum spanning tree if, for every cut of the graph, there is a unique light edge crossing the cut. Show that the converse is not true by giving a counterexample.
-
Design a quality classroom environment Using a birds-eye view, you will creatively design a quality classroom environment for infants / toddlers. You will work on creating surroundings conducive to...
-
Males Rating Females on OKCupid Exercise 2.188 introduced data showing the age of males that females find most attractive, based on the age of the females doing the rating. Here we examine the...
-
The April 30 bank statement of Durkin Engineering Associates has just arrived from Maine First Bank. To prepare the Durkin bank reconciliation, you gather the following data: a. Durkins Cash account...
-
what manner does the dialectic between consequentialist utilitarianism and deontological ethics elucidate the ethical complexities inherent in contemporary technological advancements, particularly in...
-
Western Digital, a developer of storage devices and solutions, has grown dramatically since it was established in 1970. Based in San Jose, California, they employ more than 61,000 with locations...
-
You will randomly generate integer numbers between -50 and +50 (including -50 and +50). You will repeat this process 1000 times. While generating these numbers, you need to count the numbers based on...
-
Why is it important to evaluate the credibility of a source of information?
-
Describe the components of a business plan. How does each of these components help an investor, a creditor, and a manager or owner to make decisions about a business?
-
Define liabilities. Give two examples.
-
Describe the three main functions of a business plan.
-
What is accrual accounting, and why is it important?
-
Q1: The politician hoped to silence the rumors throughlitigation; however, these lawsuits only _______ the rumors bygiving them more attention. A: decried B: denounced C: regulated D: amplified E:...
-
Explain the term global capital markets. This chapter primarily discusses global equity markets. What other types of financial instruments are traded in these markets? How important are global...
-
Assume a microinstruction set that includes a microinstruction with the following symbolic form: where AC0 is the sign bit of the accumulator and are the first seven bits of the microinstruction....
-
Convert the following decimal numbers to their binary equivalents: a. 64 b. 100 c. 111 d. 145 e. 255
-
In Section 21.3, we introduced the following constructs for predicated execution: where crel is a relation, such as eq, ne, etc.; p1, p2, and p3 are predicate registers; a is either a register or an...
-
When randomly selecting a day of the week, it is certain that you will select a day containing the letter y, so P(y) = 1. For Exercises 510, decide whether the statement makes sense (or is clearly...
-
If there is a 0.9 probability that it will rain sometime today, then there is a probability of 0.1 that it will not rain sometime today. For Exercises 510, decide whether the statement makes sense...
-
What do we mean when we say that the probability of getting 20 babies of the same gender when 20 random babies are born is 1/524,288? Is such an event unusual? Why or why not?
Study smarter with the SolutionInn App