Exam 9: Understanding Friends and Overloading Operators
Exam 1: An Overview of Object-Oriented Programming and C++55 Questions
Exam 2: Evaluating C Expressions51 Questions
Exam 3: Making Decisions50 Questions
Exam 4: Performing Loops51 Questions
Exam 5: Understanding Arrays, Strings and Pointers55 Questions
Exam 6: Using C++ Functions51 Questions
Exam 7: Using Classes56 Questions
Exam 8: Class Features and Design Issues53 Questions
Exam 9: Understanding Friends and Overloading Operators52 Questions
Exam 10: Understanding Inheritance53 Questions
Exam 11: Using Templates54 Questions
Exam 12: Handling Exceptions51 Questions
Exam 13: Advanced Input and Output55 Questions
Exam 14: Advanced Topics53 Questions
Select questions type
The ____________________ function overloads the decrement operator.
(Short Answer)
5.0/5
(31)
In C++, you use the ____ operator to dynamically allocate memory.
(Multiple Choice)
4.8/5
(42)
Match each term with the correct statement below.
Premises:
multiple calls to the same operator function
Responses:
stacking
operator overloading
pure polymorphism
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(33)
A(n) ____________________ class is a class in which all functions can access the non-public members of another class.
(Short Answer)
4.8/5
(38)
You are required to use the word friend within the function name of a friend function.
(True/False)
4.9/5
(40)
Match each term with the correct statement below.
Premises:
memory that is no longer assigned to anything in an application
Responses:
parametric overloading
pure polymorphism
stacking
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(46)
To ____ operations is to allow several operators to be used within the same expression.
(Multiple Choice)
4.8/5
(35)
In addition to overloading, compilers often need to perform coercion or casting when the + symbol is used with mixed arithmetic.
(True/False)
4.7/5
(36)
C++ ____ you to use the built-in precedence rules for your class operators.
(Multiple Choice)
4.9/5
(40)
Consider the following class declaration:
#include
using namespace std;
class Employee
{
private:
int idNum;
double salary;
public:
Employee(int, double);
double operator+(Employee);
};
Write an implementation for the operator+() function.
(Essay)
5.0/5
(30)
When you allocate memory during the execution of a program (as opposed to when the program is compiled) you ____________________ allocate memory.
(Short Answer)
4.9/5
(35)
To ____ memory for a field is to allot storage for and assign a name to it.
(Multiple Choice)
4.8/5
(28)
To use arithmetic symbols with your own objects, you must ____________________ the symbols.
(Short Answer)
4.9/5
(35)
____ is an example of overloading the prefix increment operator.
(Multiple Choice)
5.0/5
(34)
Showing 21 - 40 of 52
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)