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
The data type of a variable in a return statement must match the function type.
Free
(True/False)
4.8/5
(37)
Correct Answer:
True
The standard header file for the abs(x)function is ____.
Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
A
Assume the following.
The output of the statement:
Cout << static_cast<int>(tolower('B')) << endl;
Is ____.

Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
D
Given the following function prototype:
Double tryMe(double, double);
Which of the following statements is valid? Assume that all variables are properly declared.
(Multiple Choice)
4.7/5
(38)
The output of the statement: cout << pow(3.0, 2.0) + 5 << endl; is ____.
(Multiple Choice)
4.8/5
(38)
The statement: return 2 * 3 + 1, 1 + 5; returns the value ____.
(Multiple Choice)
4.8/5
(35)
The ____________________ of a function consists of the function name and its formal parameter list.
(Short Answer)
4.9/5
(25)
The following function heading in a C++ program is valid:
int funcExp(int u, char v, float g)
(True/False)
4.8/5
(28)
The statement: return 37, y, 2 * 3; returns the value ____.
(Multiple Choice)
4.8/5
(31)
Given the following function prototype:
Int myFunc(int, int);
Which of the following statements is valid? Assume that all variables are properly declared.
(Multiple Choice)
4.8/5
(39)
____________________ parameters are useful in three situations:
• When the value of the actual parameter needs to be changed
• When you want to return more than one value from a function
• When passing the address would save memory space and time relative to copying a large amount of data
(Short Answer)
4.7/5
(45)
Assume that all variables are properly declared. The following statement in a value-returning function is legal.


(True/False)
4.8/5
(42)
Stream variables (for example, ifstream and ofstream) should be passed by ____________________ to a function.
(Short Answer)
4.8/5
(39)
The execution of a return statement in a user-defined function terminates the program.
(True/False)
4.9/5
(38)
When you attach & after the dataType in the formal parameter list of a function, the variable following that dataType becomes a(n) ____________________ parameter.
(Short Answer)
4.8/5
(34)
Showing 1 - 20 of 41
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)