Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ 1 6 points ] Consider the following portion of memory. Each table cell is a memory location, which contains a single byte, with values

[16 points] 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 rightmost byte on each row
is shown to the right of the row. In this representation of memory, addresses increase as we move
to the left and up in the table.
(a)[2 point] What are the contents of memory location 077 ad5f34 in binary?
(b)[2 point] What are the contents of memory location 077 ad 5f3e in binary?
For each of the following code snippets, which include print f statements, write down what
would be printed out. In each part, assume that p is a pointer of type void * that has the
value 077ad5f34.
(c)[3 point]
int ***a=( int *)p;
printf(??%x,*a);
Output: ?
(d)[3 point]
char ***b=( char ***)p;
printf(??%c,***(b+2));
Output: ?
(e)[3 point]
char ***c=( char ***)p;
printf(??%s,c); [16 points] 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 rightmost byte on each row
is shown to the right of the row. In this representation of memory, addresses increase as we move
to the left and up in the table.
(a)[2 point] What are the contents of memory location 077 ad5f34 in binary?
(b)[2 point] What are the contents of memory location 077 ad 5f3e in binary?
For each of the following code snippets, which include print f statements, write down what
would be printed out. In each part, assume that p is a pointer of type void * that has the
value 077ad5f34.
(c)[3 point]
int ***a=( int *)p;
printf(??%x,*a);
Output: ?
(d)[3 point]
char ***b=( char ***)p;
printf(??%c,***(b+2));
Output: ?
(e)[3 point]
char ***c=( char ***)p;
printf(??%s,c);
Output: ?
(f) point]
long ***d=( long **)p;
printf(??%lx,**(d+1));
Output: ?
Output: ?
(f) point]
long ***d=( long **)p;
printf(??%lx,**(d+1));
Output: ?
I already know 1a is "01000010",1d is "U",1e is "BYU cs is cool!"
image text in transcribed

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

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions