quiz7_001_sol

quiz7_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 7 – Thursday 11/29 Section 001 SOLUTION 1. 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. argument, parameter b. parameter, argument c. procedure, predicate d. predicate, procedure e. declaration, defintion f. definition, declaration Use the following function declarations for the next 2 questions. void func1(int, double, string); int func2(int&); bool func3(int); 2. Which of the following statements has/have a syntax error, given n1 is an integer variable, d1 is a double variable, and s1 is a string variable? a. func1( 10, 20.0, “abc” ); b. func1( func2(n1), d1, s1 ); c. if ( func3(n1) ) cout << s1; d. n1 = func2(n1); e. cout << func2( 10 ); f. b) and e) 3. Which of the following statements does not have a syntax error, given n1 is an integer
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

quiz7_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