Exam 6: User-Defined Functions
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
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.7/5
(34)
____________________ 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.8/5
(44)
The output of the statement: cout << pow(2.0, pow(3.0, 1.0)) << endl;
Is ____.
(Multiple Choice)
4.9/5
(39)
A variable or expression listed in a call to a function is called the ____.
(Multiple Choice)
4.8/5
(41)
The function main is always compiled first, regardless of where in the program the function main is placed.
(True/False)
4.8/5
(46)
The statement: return 2 * 3 + 1, 1 + 5; returns the value ____.
(Multiple Choice)
4.9/5
(46)
Given the function prototype: double testAlpha(int u, char v, double t); which of the following statements is legal?
(Multiple Choice)
4.8/5
(27)
To use the predefined function tolower, the program must include the header file ____.
(Multiple Choice)
4.7/5
(34)
What value is returned by the following return statement? int x = 5;
Return x + 1;
(Multiple Choice)
4.9/5
(40)
A(n) ____________________ parameter is a formal parameter that receives the location (memory address) of the corresponding actual parameter.
(Short Answer)
4.8/5
(37)
A variable for which memory is allocated at block entry and deallocated at block exit is called a(n) ____________________ variable.
(Short Answer)
4.9/5
(36)
Functions that do not have a return type are called ____ functions.
(Multiple Choice)
4.8/5
(32)
Given the function prototype: float test(int, int, int);
Which of the following statements is legal?
(Multiple Choice)
4.8/5
(39)
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.9/5
(34)
A variable for which memory remains allocated as long as the program executes is called a(n) ____________________ variable.
(Short Answer)
4.8/5
(41)
If the formal parameter list of a function is empty, the parentheses after the function name are not needed.
(True/False)
4.9/5
(36)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)