homework4 solution

homework4 solution - Assigned: 02/06/2006 Due: 02/13/2006...

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
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 {
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/02/2008 for the course CPR E 211 taught by Professor Wang during the Spring '06 term at Iowa State.

Page1 / 5

homework4 solution - Assigned: 02/06/2006 Due: 02/13/2006...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online