Chapter12solutions - Chapter 12 12.1 Name cc dd ff ii 12.2...

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

View Full Document Right Arrow Icon
Chapter 12 12.1 Name Type Offset Scope cc char -1 BlockA dd char -3 BlockA (i.e., same block as cc) ff float 0 BlockA (i.e., same block as cc…) ii int -2 BlockA (i.e., same block as cc…) 12.2 1. If r is a local variable, then it will not be initialized, i.e., it will have an unknown value to start with. 2. If r is a global variable, then it will be initialized to 0. 12.3 -2147483648 plusOrMinus 2147483647 0 positive 4294967295 12.4 1. 0.00000000111 2. -2.1 3. 101.101 12.5 LDR R0, ASCII_a STR R0, R5, #0 ; c = 'a' AND R0, R0, #0 ADD R0, R0, #3 STR R0, R5, #-1 ; x = 3 AND R0, R0, #0 ADD R0, R0, #10 STR R0, R5, #-3 ; z = 10 ASCII_a : .FILL 97 12.6 The output of the program will be as follows: 2 2 3 0 12.7 Expression Value of expression Value of a afterwards Value of b afterwards a | b 15 6 9 a || b 1 6 9 a & b 0 6 9 a && b 1 6 9 !(a + b) 0 6 9 a % b 6 6 9 b / a 1 6 9 a = b 9 9 9 a = b = 5 5 5 5 ++a + b-- 16 7 8 a = (++b < 3) ? a : b 10 10 10 a <<= b 3072 3072 9
Background image of page 1

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

View Full DocumentRight Arrow Icon
12.8 a. (('a' <= letter && letter <= 'z') || ('A' <= letter && letter <= 'Z') || ('0' <= letter && letter <= '9')) b. (!(('a' <= letter && letter <= 'z') || ('A' <= letter && letter <= 'Z') ||
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 homework help was uploaded on 04/07/2008 for the course ECE 495K taught by Professor Vijaykumar during the Spring '08 term at Purdue University-West Lafayette.

Page1 / 5

Chapter12solutions - Chapter 12 12.1 Name cc dd ff ii 12.2...

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