{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Ch05_Questions - C Programming From Problem Analysis to...

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

View Full Document Right Arrow Icon
C# Programming: From Problem Analysis to Program Design , 2nd edition ISBN 1423901460 Chapter 5 1. a. true or false 2. d. a + 7 3. b. 3 4. c. This is a high score! This is a test question! 5. c. if (code == 'C') Console.WriteLine (“This is a check”); 6. c. You failed the test! You passed the test! 7. c. && 8. d. 1 1 9. c. used as part of an assignment statement 10. a. distracts away from the readability 11. b. AND 12. d. every time the program is executed Doyle: C#, 2nd edition ISBN 1423901460    Page 1-1
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
13. d. 27 14. a. 15 15. d. curly braces 16. d. Blue, blue sail on through Green, green, nice and clean 17. c. 2000 18. c. if (control == 11) 19. b. Logicall OR yields true if either or both of the operands are true 20. d. a and b are correct 21. Assuming a is 5, b is 6, and c is 8, which of the following is false? c. c <= 4 false d. (1 + a) != b false 22. For testing the single value (100), the switch statement could be ok. However, to simulate the else portion, you would have enter 101 case values (0,1,2…99) and a default case. Thus you would not want to attempt to solve this problem with a switch statement. There is no range option available with switch
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 ]}