100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COSC 1408 Chapter 14 Exam Questions and Answers Latest Update Graded A+

Rating
-
Sold
-
Pages
8
Grade
A+
Uploaded on
23-10-2024
Written in
2024/2025

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 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 (e) None of these - Answers (b) work in its usual way, but with programmer-defined data types When a class contains an instance of another class, it is known as ________. (a) object overloading (b) operator overloading (c) object composition (d) dynamic composition (e) None of these - Answers (c) object composition If you do not furnish one of these, an automatic memberwise copy will be performed when one object is assigned to another object. (a) overloaded constructor function (b) overloaded assignment operator (c) default constructor function (d) overloaded copy operator (e) None of these - Answers (b) overloaded assignment operator It is a good idea to make a copy constructor's parameters ________ by specifying the ________ key word in the parameter list. (a) inline, inline (b) static, static (c) constant, const (d) global, global (e) None of these - Answers (c) constant, const A reason to overload the ________ is to write classes that have array-like behaviors.

Show more Read less
Institution
COSC 1408 Chapter 14
Course
COSC 1408 Chapter 14









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
COSC 1408 Chapter 14
Course
COSC 1408 Chapter 14

Document information

Uploaded on
October 23, 2024
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

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

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

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TutorJosh Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
342
Member since
1 year
Number of followers
16
Documents
28567
Last sold
1 day ago
Tutor Joshua

Here You will find all Documents and Package Deals Offered By Tutor Joshua.

3.6

53 reviews

5
18
4
14
3
12
2
0
1
9

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions