Exam 4: Parameters and Overloading
Exam 1: C++ Basics37 Questions
Exam 2: Flow of Control33 Questions
Exam 3: Function Basics30 Questions
Exam 4: Parameters and Overloading31 Questions
Exam 5: Arrays32 Questions
Exam 6: Structures and Classes37 Questions
Exam 7: Constructors and Other Tools32 Questions
Exam 8: Operator Overloading,friends,and References31 Questions
Exam 9: Strings37 Questions
Exam 10: Pointers and Dynamic Arrays29 Questions
Exam 11: Separate Compilation and Namespaces35 Questions
Exam 12: Streams and File IO43 Questions
Exam 13: Recursion40 Questions
Exam 14: Inheritance30 Questions
Exam 15: Polymorphism and Virtual Functions34 Questions
Exam 16: Templates27 Questions
Exam 17: Linked Data Structures30 Questions
Exam 18: Exception Handling29 Questions
Exam 19: Standard Template Library46 Questions
Exam 20: Patterns and Uml22 Questions
Select questions type
Write a definition for a void-function that has two int value parameters and outputs to the screen the product of these arguments.Write a main function that asks the user for these two numbers,reads them in,calls your function,then terminates.
(Essay)
4.9/5
(38)
Default arguments can be used with either call-by-value or call-by-reference parameters.
(True/False)
4.8/5
(41)
Which of the following overloadings will be invoked by this call? g(1,2);
(Multiple Choice)
4.7/5
(33)
The fundamental rule for testing functions requires that every function be tested in an already fully tested and debugged program.How can this be accomplished? Give a testing scenario for testing a program with main function that calls several functions.
(Essay)
4.8/5
(45)
Names of parameters in functions,especially function prototypes,have no meaning,and may be selected quite arbitrarily.
(True/False)
4.7/5
(40)
Mixing call-by-reference and call-by-value parameters is strictly prohibited.
(True/False)
4.8/5
(34)
A program should have all of its functions written before testing can begin.
(True/False)
4.9/5
(35)
There is no problem with the compiler distinguishing these two function definitions:
void func(double x){/*…*/}
int func(double x){/*…*/ return something_double;}
(True/False)
4.8/5
(33)
Write a void function using two type int call-by-reference parameters that swaps the values in the arguments.Be sure to include testable pre and post conditions.
(Essay)
4.7/5
(36)
Showing 21 - 31 of 31
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)