Question: Consider the following portion of memory. Each table cell is a memory location, which contains a single byte, with values shown in hex, and
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));
Step by Step Solution
3.27 Rating (147 Votes )
There are 3 Steps involved in it
Lets address each part of your question a The contents of memory location 0x36ca2... View full answer
Get step-by-step solutions from verified subject matter experts
