Chapter 11 IM Answers

Chapter 11 IM Answers - An Introduction to Programming with...

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

View Full Document Right Arrow Icon
978-1-4188-3618-4 Chapter 11 Answers CONCEPT LESSON REVIEW QUESTIONS 1. c All of the elements in a one-dimensional array have the same subscript. 2. c subscript 3. b int population[5] = {0}; 4. b 500 with 510 5. a 20000 with 900 6. a display 22000 7. d 8. d while (x <= 4) { sales[x] = sales[x] + 100; x = x + 1; } //end while 9. b while (x < 4) { total = total + nums[x]; x = x + 1; } //end while avg = static_cast<double>(total) / static_cast<double>(x); 10. a 0.0 11. c 6.0 12. b 5.0 13. d 8.0 14. a 0, 0 15. a combination of two subscripts 16. c int sales[3][4] = {0}; 17. d 800 with 810 18. a 20000 with 900 19. a display 1300 20. d 21. c cout << cities[8] << endl; EXERCISES – PENCIL AND PAPER 1. int numbers[20] = {0}; numbers[1] = 7; 2. double rates[5] = {6.5, 8.3, 4.0, 2.0, 10.5}; 3. for (int x = 0; x < 5; x = x + 1) cout << rates[x] << endl; //end for 4. int x = 0; while (x < 5)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/11/2010 for the course CS 343 taught by Professor Katzman during the Spring '09 term at ITT Tech Tucson.

Page1 / 3

Chapter 11 IM Answers - An Introduction to Programming with...

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

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