Exam 11: Friends, overloaded Operators, and Arrays in Classes
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
Why should you generally pass an object of the class to a friend function as a reference parameter?
Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
E
Which of the following statements are true?
Free
(Multiple Choice)
4.7/5
(38)
Correct Answer:
C
Since accessor functions in a class do not modify or mutate the data members of the object,the function should have the __________ modifier.
Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
C
A _________ function is not a member of the class,but has access to the private members of the class.
(Short Answer)
4.8/5
(31)
If we have a full selection of accessor and mutator functions,why would we have friend functions?
(Multiple Choice)
4.8/5
(35)
You may not change the precedence of operators by overloading them
(True/False)
4.7/5
(41)
An operator that expects only one parameter is called a ________ operator
(Short Answer)
4.7/5
(40)
A friend function needs to be passed an object of the class.If the friend only needs to access the object,but not change its data members,then the object should be passed as _______________
(Short Answer)
4.8/5
(41)
The following is a properly declared overloaded insertion operator for myClass.
ostream& operator <<ostream &out,const myClass &obj);
(True/False)
4.9/5
(41)
Functions that are constant member functions may call the class mutator functions.
(True/False)
4.9/5
(34)
When overloading an operator,which of the following is true?
(Multiple Choice)
4.7/5
(29)
Functions that are constant member functions may call constant class accessor functions.
(True/False)
4.8/5
(35)
Which of the following function declarations would be correct to overload the multiply operator for the Rational numbers class?
(Multiple Choice)
4.8/5
(32)
Putting the keyword const in front of a pass by reference parameter guarantees ___________________
(Essay)
4.9/5
(29)
Showing 1 - 20 of 49
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)