The University of Alabama in Huntsville Electrical and Computer Engineering CPE 112 02 Final Exam Solution December 6, 2001 1. F 2. T 3. T 4. constant 5. F 6. T 7. T 8. F 9. T 10. F 11. T 12. F 13. T 14. F 15. T 16. T 17. F 18. implementation 19. algorithm 20. identifier 21. coercion 22. ofstream 23. Functional decomposition 24. x == 5 || y == 5 25. priming read 26. parameter 27. scope 28. selection 29. enumeration type 30. Promotion 31. hierarchical 32. for (i = 0; i < 30; i++) cout << aNovel.author(i); 33. aggregate 34. char letterGrade[25]; 35. a 36. a 37. d 38. b 39. a 40. b 41. a 42. e 43. c 44. d 45. a 46. c 47. c 48. b 49. c 50. d 51. d 52. b 53. struct player_t { int assists; int points; int blocks; int rebounds; } 54. int Array_Min (int input_array[], int size) { int i; int min; min = input_array[0]; for (i = 1; i < size; i++) if (input_array[i] < min) min = input_array[i]; return min; } 55. a. 7.0 b. -1.0 c. 3.0 d. 7.0 e. 5.0 f. 3.0 56. 12_12_3, where _ is a space 57. 3_9_18_30_45, where _ is a space 58. a. int Count_Lines (ifstream& input_file) { char ch; int count = 0; input_file.get(ch); while (input_file) { if (ch == '\n') count++; input_file.get(ch); } return count; } b. #include ifstream input_file; input_file.open("myfile.input"); int line_count; line_count = Count_Lines(input_file);