Exam 6: User-Defined Functions
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 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 (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
The output of the statement: cout << pow(3.0,2.0)+ 5 << endl; is ____.
Free
(Multiple Choice)
4.8/5
(44)
Correct Answer:
D
Using functions greatly enhances a program's readability because it reduces the complexity of the function main.
Free
(True/False)
4.8/5
(34)
Correct Answer:
True
The statement: return 2 * 3 + 1,1 + 5; returns the value ____.
Free
(Multiple Choice)
4.9/5
(45)
Correct Answer:
C
If the formal parameter list of a function is empty,the parentheses after the function name are not needed.
(True/False)
4.7/5
(45)
A variable or expression listed in a call to a function is called the ____.
(Multiple Choice)
4.8/5
(38)
A variable for which memory remains allocated as long as the program executes is called a(n)____________________ variable.
(Short Answer)
4.8/5
(49)
Given the following function:
int strange(int x,int y)
{
if (x > y)
Return x + y;
else
Return x - y;
}
What is the output of the following statement?
Cout << strange(4,5)<< endl;
(Multiple Choice)
4.9/5
(39)
Stream variables (for example,ifstream and ofstream)should be passed by ____________________ to a function.
(Short Answer)
4.8/5
(33)
A function ____________________ is a function that is not fully coded.
(Short Answer)
4.8/5
(38)
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.8/5
(33)
Functions that do not have a return type are called ____ functions.
(Multiple Choice)
4.9/5
(31)
The ____________________ of an identifier refers to where in the program an identifier is accessible (visible).
(Short Answer)
4.8/5
(32)
If a formal parameter is a nonconstant reference parameter,during a function call,its corresponding actual parameter must be a(n)____________________.
(Short Answer)
4.8/5
(43)
The ____________________ of a function consists of the function name and its formal parameter list.
(Short Answer)
4.9/5
(39)
The output of the statement: cout << tolower('$')<< endl;
Is ____.
(Multiple Choice)
4.8/5
(36)
The output of the statement: cout << pow(2.0,pow(3.0,1.0))<< endl;
Is ____.
(Multiple Choice)
4.9/5
(33)
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.9/5
(44)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)