quiz2_001_sol

quiz2_001_sol - CS 010 Intro to Computer Science I Fall -...

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

View Full Document Right Arrow Icon
CS 010 – Intro to Computer Science I Fall - 2007 Quiz 2 – Thursday 10/11 - section 001 SOLUTION Each question is worth 1 point. 1. The symbol “#” at the beginning of a line in a C++ programs signifies: a. A comment, to be ignored by the compiler. b. Use of a function provided by the Standard Library. c. The line starting with “#” is the program name. d. The line starting with “#” is written in assembly language rather than C++ e. The line starting with “#” is an instruction to the compiler, not a line of C++ code. 2. Which of the following is an example of a literal ? a. 10 b. 4.5 c. “count” d. count e. All except d) are literals f. None of the above is a literal 3. Which of the following is NOT a valid assignment statement (assume all variables have been appropiately declared and initialized as needed)? a. product = n * m; b. n + m = sum; c. result = result + 5; d. 5 = n – m; e. b) and d) f. none: all of them are valid 4. What is output by the following statement? cout << 5 + 10 * 20;
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.

Page1 / 2

quiz2_001_sol - CS 010 Intro to Computer Science I Fall -...

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