Functions_Q_1_Spring_2011_C

# Functions_Q_1_Spring - 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

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
This is the end of the preview. Sign up to access the rest of the 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.

### Page1 / 3

Functions_Q_1_Spring - 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

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

View Full Document
Ask a homework question - tutors are online