COSC 1408 Chapter 14 Exam Questions and Answers Latest Update Graded A+
Each object of a class has its own copy of the class's ________.
(a) member functions
(b) member variables
(c) constructor and destructor functions
(d) All of these
(e) None of these - Answers (b) member variables
Th...
Each object of a class has its own copy of the class's ________.
(a) member functions
(b) member variables
(c) constructor and destructor functions
(d) All of these
(e) None of these - Answers (b) member variables
This type of member variable may be accessed before any objects of the class have been created.
(a) private
(b) public
(c) inline
(d) static
(e) None of these - Answers (d) static
This operator may be used to assign one object to another.
(a) =
(b) ==
(c) <>
(d) @
(e) None of these - Answers (a) =
C++ requires that a copy constructor's parameter be a(n) ________.
, (a) integer data type
(b) floating point data type
(c) pointer variable
(d) reference object
(e) None of these - Answers (d) reference object
C++ allows you to redefine the way ________ work when used with class objects.
(a) compiler errors
(b) preprocessor directives
(c) standard operators
(d) undefined variables
(e) None of these - Answers (c) standard operators
When objects contain pointers, it is a good idea to create an explicit ________ function.
(a) destructor
(b) copy constructor
(c) static constructor
(d) inline constructor
(e) None of these - Answers (b) copy constructor
A good reason for overloading an operator is to enable it to ________.
(a) outperform its C language counterparts
(b) work in its usual way, but with programmer-defined data types
(c) operate on more operands than in its standard definition
(d) operate on no operands
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller TutorJosh. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £6.56. You're not tied to anything after your purchase.