Final Exam Practice Questions

Final Exam Practice Questions - P age |1 CSE 100, FALL 2007...

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

View Full Document Right Arrow Icon
P a g e  | 1 CSE 100, FALL 2007 Arizona State University Practice Question with Answers True/False Indicate whether the statement is true or false. ____ 1. The operating system monitors the overall activity of the computer and provides services such as memory management, input/output activities, and storage management. ____ 2. A sequence of 0s and 1s is referred to as binary code. ____ 3. The value of the expression 8 * 5 % 3 is 16 . ____ 4. In a mixed expression, all integer operands are converted to floating-point numbers with zero decimal part. ____ 5. Suppose x = 15.7 . The output of the statement cout << static_cast<int>(x) / 2 << endl; is 7 . ____ 6. Suppose x = 10 . After the execution of the statement y = x--; y is 10 and x is 8 . ____ 7. Suppose a = 5 . After the execution of the statement b = --a; b is 3 and a is 3 . ____ 8. The function peek returns the next character in the input stream; it does not remove the character from the input stream. ____ 9. Suppose P and Q are logical expressions. The logical expression P && Q is true if both P and Q are true. ____ 10. Assume all variables are properly declared. The output of the following C++ code is 2 3 4 5 . n = 1; while (n < 5) { n++; cout << n << " "; } ____ 11. Assume all variables are properly declared. The output of the following C++ code is Stoop . cout << "St" ; for (count = 5; count <= 3; count--) cout << 'o'; cout << 'p' ; ____ 12. A value-returning function returns only floating-point values. ____ 13. A value-returning function with more than 10 parameters will result in a compile-time error. ____ 14. Assume that you have the following declarations.
Background image of page 1

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

View Full DocumentRight Arrow Icon
P a g e  | 2 int alpha[100]; int beta[25][4]; In this declaration, the array alpha has more elements than the array beta . ____ 15. Suppose that you have the following list: int list[7] = {2, 5, 8, 11, 14, 17, 20}; Assume that a sequential search on an ordered list is used to determine whether 11 is in the list . When the loop terminates, the value of the index variable loc is 3 . ____ 16.
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.

Page1 / 8

Final Exam Practice Questions - P age |1 CSE 100, FALL 2007...

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

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