{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

homework4 solution

# homework4 solution - Assigned Due CprE 211 Spring 2007...

This preview shows pages 1–3. Sign up to view the full content.

Assigned: 02/06/2006 Due: 02/13/2006 CprE 211 – Spring 2007 Homework 4 Name: Lab section #: Email address: All following questions are regarding the MPC555 processor, which is 32-bit and by default big-endian. 1. [15] Data memory layout and Pointers a. [8] Given the C variable declarations, place the variables into memory locations in the table below. Put the name of the variable into any memory location that it uses. Place an X in any unused location . char a[5]; double b; short c; int d; long e; short f; char *g; Assume that the block of variables is allocated in memory beginning at address 0x30001000. That is, the address of variable “a” is 0x30001000. Assume the computer is of 32-bit architecture with big-endian type. Address Each column is one byte. Thus, a row is a double word. 0x30001000 a a a a a X X X 0x30001008 b b b b b b b b 0x30001010 c c x x d d d d 0x30001018 e e e e f f X X 0x30001020 g g g g X X X X 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Assigned: 02/06/2006 Due: 02/13/2006 b. [2] What is the size of the following structure? Explain . Hint: There is a restriction on the size of C structure. struct personal {
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

homework4 solution - Assigned Due CprE 211 Spring 2007...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online