Exam 4: Procedural Abstraction and Functions That Return a Value
Exam 1: Introduction to Computer and C++ Programming56 Questions
Exam 2: C++ Basics57 Questions
Exam 3: More Flow of Control45 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value53 Questions
Exam 5: Functions for All Sub Tasks54 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes52 Questions
Exam 7: Arrays48 Questions
Exam 8: Strings and Vectors69 Questions
Exam 9: Pointers and Dynamic Arrays39 Questions
Exam 10: Defining Classes61 Questions
Exam 11: Friends, Overloaded Operators, and Arrays in Classes56 Questions
Exam 12: Separate Compilation and Namespaces41 Questions
Exam 13: Pointers and Linked Lists64 Questions
Exam 14: Recursion48 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates35 Questions
Exam 18: Standard Template Library59 Questions
Select questions type
When a variable is local to a function, we say that it has ___ of the function
(Multiple Choice)
4.9/5
(37)
When you want to use a function in your program, you would make a function __________.
(Short Answer)
4.8/5
(36)
If you need to write a function that will compute the cost of some candy, where each piece costs 25 cents, which would be an appropriate function declaration?
(Multiple Choice)
4.7/5
(30)
What is the output of the following function call?
//function body
Int factorialint n)
{
Int product=0;
Whilen > 0)
{
Product = product * n;
N-;
}
Return product;
}
//function call
Cout << factorial4);
(Multiple Choice)
4.9/5
(36)
What is the output of the following program fragment?
Cout << static_cast<double>3)/4 << endl;
(Multiple Choice)
4.9/5
(38)
Constant variables that might be used in different functions should be _________
(Short Answer)
4.9/5
(33)
What is the output produced by the following code fragment?
int i = 3;
cout << "The value of i is " << sqrtpowi,4.0)) << endl;
(Short Answer)
4.7/5
(36)
If you have the two functions as shown,
Int someFunctionint value);
Float someFunctionfloat value);
And a variable x, which is a double, which function is called by the following statement?
Cout << someFunctionx);
(Multiple Choice)
4.9/5
(38)
Showing 41 - 53 of 53
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)