The University of Alabama in Huntsville Electrical & Computer Engineering CPE 112 Fall 2002 Test 3 Solution 1. T 2. T 3. T 4. T 5. T 6. T 7. F 8. T 9. d 10. a 11. a 12. a 13. e 14. b 15. b 16. d 17. a 18. d 19. iteration 20. logical 21. count 22. value 23. reference 24. argument 25. selection 26. 1_3_6_10_15_, where _ is a space 27. void GetMeanOf (/* in */ int num, /* out */ float& mean) { int count; float sum = 0.0; float value; for (count = 1; count <= num; count++) { cin >> value; sum = sum + value; } mean = sum/num; } 28. int sum = 0; int count; for (count = 17; count < 36; count = count + 2) sum = sum + count; 29. a 10 x 10 a 10 b 7 y 7 b 17 b U 30. 1 2 5 3 4