Exam 6: User-Defined Function
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
A variable listed in a header is known as a(n) ____ parameter.
(Multiple Choice)
4.9/5
(32)
Given the function prototype: float test(int, int, int);
Which of the following statements is legal?
(Multiple Choice)
4.8/5
(33)
If a function needs to return more than one value, as a rule of good programming style, you should change it to a(n) ____________________ function and use the appropriate reference parameters to return the values.
(Short Answer)
4.8/5
(43)
Functions that do not have a return type are called ____ functions.
(Multiple Choice)
4.8/5
(34)
The function main is always compiled first, regardless of where in the program the function main is placed.
(True/False)
4.8/5
(35)
Using functions greatly enhances a program's readability because it reduces the complexity of the function main.
(True/False)
4.8/5
(41)
Given the following function: what is the output of the following statement?
Cout << strange(4, 5) << endl;


(Multiple Choice)
4.8/5
(36)
Given the function prototype:
Double testAlpha(int u, char v, double t);
Which of the following statements is legal?
(Multiple Choice)
4.9/5
(37)
To use the predefined function tolower, the program must include the header file ____.
(Multiple Choice)
4.9/5
(39)
The following return statement returns the value 10.
return 10, 16;
(True/False)
4.8/5
(44)
In C++, a function prototype is the function heading without the body of the function.
(True/False)
4.9/5
(35)
A variable or expression listed in a call to a function is called the ____.
(Multiple Choice)
5.0/5
(47)
Given the following function: what is the output of the following statement?
Cout << next(next(5)) << endl;


(Multiple Choice)
4.8/5
(44)
Which statement below about prototypes and headers is true?
(Multiple Choice)
4.8/5
(33)
A function ____________________ is a function that is not fully coded.
(Short Answer)
4.8/5
(33)
The output of the statement: cout << pow(2.0, pow(3.0, 1.0)) << endl;
Is ____.
(Multiple Choice)
4.8/5
(35)
Once you write and properly debug a function, you can use it in the program (or different programs) again and again without having to rewrite the same code repeatedly.
(True/False)
4.8/5
(45)
The output of the statement: cout << tolower('$') << endl;
Is ____.
(Multiple Choice)
4.9/5
(40)
If the formal parameter list of a function is empty, the parentheses after the function name are not needed.
(True/False)
4.7/5
(35)
Showing 21 - 40 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)