Exam 4: Procedural Abstraction and Functions That Return a Value
Exam 1: Introduction to Computer and C Programming55 Questions
Exam 2: C++ Basics54 Questions
Exam 3: More Flow of Control44 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value51 Questions
Exam 5: Functions for All Sub Tasks53 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes51 Questions
Exam 7: Arrays34 Questions
Exam 8: Strings and Vectors63 Questions
Exam 9: Pointers and Dynamic Arrays40 Questions
Exam 10: Defining Classes50 Questions
Exam 11: Friends, overloaded Operators, and Arrays in Classes49 Questions
Exam 12: Separate Compilation and Namespaces38 Questions
Exam 13: Pointers and Linked Lists51 Questions
Exam 14: Recursion43 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates33 Questions
Exam 18: Standard Template Library57 Questions
Select questions type
Which of the following are not legal function declarations?
(Multiple Choice)
4.7/5
(36)
The functions pow),sqrt),and fabs)are found in which include file?
(Multiple Choice)
4.7/5
(31)
When you want to use a function in your program,you would make a function __________.
(Short Answer)
5.0/5
(30)
the types of parameters are optional in the function declaration
(True/False)
4.9/5
(49)
What is the value of i after the following function call?
//function definition
Int doSomethingint value)
{
Value = 35;
Return value;
Value = 13
}
//fragment of main program
Int i=0;
Cout << doSomethingi);
(Multiple Choice)
4.8/5
(41)
Every include directive must be followed by using namespace std;
(True/False)
4.9/5
(38)
variables that are declared outside of any function body or parameter list are considered global.
(True/False)
4.8/5
(38)
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
(39)
When the function below is called,the _____ of the actual parameters is passed to the function definition.
Double sqrtdouble value);
(Multiple Choice)
4.8/5
(38)
Which of the following are valid function calls to the pow function?
(Multiple Choice)
4.8/5
(36)
The _________ of a variable is where that variable can be used.
(Short Answer)
4.9/5
(31)
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.8/5
(28)
Showing 21 - 40 of 51
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)