{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

mid1w10sol - ECEn 324 Winter 2010 Midterm#1 Solution 1 a b...

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

View Full Document Right Arrow Icon
1 ECEn 324 Winter 2010 Midterm #1 Solution 1. Which of the following was NOT suggested by the text as a reason for the success of C? a. C was closely tied with Unix. b. C is small and simple. c. C was designed by an ANSI standard committee. d. C was designed for a practical purpose. Solution: Options a, b, and d are all made clear in the blue box on pages 3-4. It is also stated that the design was controlled by a single person, rather than a committee, so statement c is false and should have been selected. 2. Suppose I’m debugging a program in GDB . If I examine a byte of memory and see that it contains the ASCII code for ‘q’, which of the following can I safely conclude? 3. On a 32-bit little-endian machine, if a long stored at address A has value 0x12345678 , then the value of the byte at address A is a. 0x12 b. 0x34 c. 0x56 d. 0x78 Solution: The correct answer is d. See Section 2.1.4. 4. The decimal value of 0xffffffb8 interpreted as a two's complement number is 0x00000048, which is 64+8, or 72. Therefore, the original value was -72. 5. The value of 0xffffffb8 interpreted as a single-precision floating-point number is
Background image of page 1

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

View Full Document Right Arrow Icon
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.

{[ snackBarMessage ]}