YH558460 - TRUE FALSE 1. A function may return more than...

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

View Full Document Right Arrow Icon
TRUE FALSE 1. A function may return more than one item ANSWER: False 2. function naming rules follow variable naming rules ANSWER: TRUE 3. Every include directive must be followed by using namespace std; ANSWER: False 4. the types of parameters are optional in the function declaration ANSWER: False 5. the parameter names are mandatory in the function header ANSWER: False 6. it is possible to have a function that has no parameters ANSWER: TRUE 7. the parameters listed in the function declaration are considered global variables ANSWER: False 8. variables that are declared outside of any function body or parameter list are considered global. ANSWER: TRUE 9. pow(2,3) is the same as pow(3,2). ANSWER: False 10. Functions may have multiple return statements. ANSWER: TRUE Fill In the Blank 1. #include <cmath> is known as an ___________________. ANSWER: include directive 2. The absolute value function abs is located in the _________ library. ANSWER: cstdlib 3. Converting from one type to another is called ______________. ANSWER: casting 4. What is the value of (pow(2,sqrt(9.0)+ceil(0.99)))? ______________ ANSWER: 16 5. Write the code to convert the value in an integer variable named count to a double. _____________________. ANSWER: static_cast<double>(count) 6. In the following function declaration, the variable size is known as a _________________. int myFunction ( int size); ANSWER: (formal) parameter 7. The ______________ describes how the function will work. ANSWER: function body 8. When you want to use a function in your program, you would make a function __________. ANSWER: call or invocation 9. What is the output produced by the following code fragment?
Background image of page 1

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

View Full DocumentRight Arrow Icon
int i = 3; cout << "The value of i is " << sqrt(pow(i,4.0)) << endl; ANSWER: 9.0 10. The black box analagy demonstrates the concept of _________________. ANSWER: information hiding or procedural abstraction
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/02/2012 for the course CSC CSC 175 taught by Professor Kraft during the Winter '12 term at Michigan Flint.

Page1 / 7

YH558460 - TRUE FALSE 1. A function may return more than...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online