1. b) c) and e) since 34 and 8Z start with a digit and min.value contains a '.' 2. a) b) and d) 3. z is not initialized. 4. a) 1 / z * (x + y) b) x*y + x*z - 3 c) x + y/2 d) (x + y)/ 2 e) (a + b)*c 5. a) The semi-colon at the end of the if line will result in the compiler flagging the else as an error. b) The semi-colon after the else means that the null statement is executed if the condition is false and so x++ will always be executed. c) Missing semi-colon after the assignment statement following the if. d) Two problems. The semi-colon after the while and the x++ will always be executed. 6. a) 2 b) 18 c) 20 d) 18 7. a) Truncation, x will be assigned the value 2. b) x will be assigned the value 1.0 c) y will be assigned the value x + 2.1 since (3/2) evaluates to 1. d) As for c). Several fixes, but double(3)/2 would work. 8. int a, b, c; cin >> a >> b; c = testfunc(a, b); 9. int sum=0; if (x == 1) { sum = sum + 1; cout << "Add one \n"; } else if (x == 2) { sum = sum + 2; cout << "Add two \n"; } else if (x == 3) { sum = sum + 3; cout << "Add three \n"; } else cout << "Ouch \n"; 10.a) XXX b) XXXX 11. a) int i; for (i=1; i<=5; i=i+2) cout << "loop\n"; b) int j; for (j=10; j>0; j--) cout << "loop\n";