This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CSCI 152 C Quiz 1 ( 16 Feb ) Spring 2011 Name _____________________________________ 1. Given this function prototype: int ABC (int x, double c); For each of the following statements, is it a valid way to call ABC or not? The variable y is an int. a. valid invalid cout << ABC (“4”, “7.2”); b. valid invalid if ( ABC (1, 2.0, 3) < ABC (5.2, 2) ) cout << “ABC”; c. valid invalid y = ABC (10, 4.5); d. valid invalid cout << ABC (3.3); 2. The word void used as a return type means that the function returns a value of 0. a. true b. false 3. Every function must have at least one formal parameter. a. true b. false 4. If a function contains more than one return statement, the first return statement which is executed terminates the function.terminates the function....
View Full Document
This note was uploaded on 04/24/2011 for the course CSCI 1302 taught by Professor Harter during the Spring '11 term at Texas A&M University–Commerce.
- Spring '11