quiz6_001_sol

# quiz6_001_sol - CS 010 Intro to Computer Science I Fall...

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

CS 010 – Intro to Computer Science I Fall - 2007 Quiz 6 – Thursday 11/15 Section 001 SOLUTION 1. Given the text's graphics package, and given that a Point p , a Circle c , and a double x have already been correctly declared and initialized, which statement has a syntax error? a. x = ( c.get_center() ).get_x(); b. p = cwin.get_mouse("click anywhere"); c. Point new_p = p.move(3, 4); d. Circle new_c = Circle(p, x); e. x = p.get_x() + ( c.get_center() ).get_x(); f. none of the above 2. What will be output by the following code? int sum = 0; for (int i = 0; i < 10; i = i + 3) sum = sum + i; cout << sum << endl; a. 0 3 6 9 b. 3 6 9 12 c. 9 d. 12 e. 18 f. 30 3. Fill in the two blanks with the correct words in the following sentence about function Each expression in the ____(1) _____ list is evaluated, and the result used to initialize the corresponding variable in the ____(2) _______ list. a.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

quiz6_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
Ask a homework question - tutors are online