• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

BCS230 Final || All Correct 100%.

Document preview thumbnail
Preview 2 out of 5 pages

BCS230 Final || All Correct 100%.

Content preview

BCS230 Final || All Correct 100%.
1) Each object of a class has its own copy of the class's correct answers instance member
variables.

2) A(n) ________ member variable may be accessed before any objects of the class have been
declared. correct answers static

3) True/False: When a class declares an entire class as its friend, the friendship status is
reciprocal. That is, each class's member functions have free access to the other's private
members. correct answers FALSE

4) The ________ operator may be used to assign one object to another. correct answers =

5) True/False: By default, when an object is assigned to another, each member of one object is
copied to its counterpart in the other object. correct answers TRUE

6) C++ requires that a copy constructor's parameter be correct answers a reference to an object.

7) C++ allows you to overload correct answers operators and functions.

8) When a class contains a pointer to dynamically allocated memory, it is a good idea to equip
the class with correct answers a copy constructor.

9) True/False: When a class contains a pointer to dynamically allocated memory, it a good idea
to have the class overload the assignment operator. correct answers TRUE

10) True/False: If you overload the prefix ++ operator, the postfix ++ operator is automatically
overloaded also. correct answers FALSE

11) A good reason for overloading an operator is to enable it to correct answers be used with
types defined by the programmer.

12) The process of having a class contain an instance of another class is known as correct
answers object composition.

13) True/False: If a function f is a friend of a class A, and the class A is a friend of a class B,
then the function f is able to access private members of B. correct answers FALSE

14) True/False: C++ permits you to overload the sizeof operator. correct answers FALSE

15) True/False: A static member variable can be used when there are no objects of the class in
existence. correct answers TRUE

16) If you do not furnish a(n) ________, an automatic memberwise copy will be performed when
one object is assigned to another object. correct answers overloaded assignment operator

, 17) It is a good idea to make a copy constructor's parameters ________ by specifying the
________ keyword in the parameter list. correct answers constant, const

18) A reason to overload the ________ is to write classes that have array-like behavior. correct
answers square brackets [ ]

19) True/False: When you overload the << operator, you must also overload the >> operator
correct answers FALSE

20) True/False: You can overload the conditional operator to make it function as an
unconditional operator. correct answers FALSE

21) ________ allows us to create new classes based on existing classes. correct answers
Inheritance

22) When you derive a class from an existing class, you correct answers can add both new data
and new functions.

23) A situation in which every object of a class A has a pointer to an object of a class B, and the
objects of the class B may outlive objects of class A, is called correct answers aggregation.

24) ________ members of a base class are never accessible to a derived class. correct answers
Private

25) The ________ class constructor is called before the ________ class constructor. correct
answers base, derived

26) True/False: In an inheritance situation, you can't pass arguments to a base class constructor.
correct answers FALSE

27) True/False: A derived class may become a base class, if another class is derived from it.
correct answers TRUE

28) In the statement class Car:public Vehicle, which is the base class? correct answers Vehicle

29) Arguments are passed to the base class destructor function by the ________ class ________
function.
A) derived, constructor
B) derived, destructor
C) base, constructor
D) base, destructor
E) None of the above correct answers None of the above

30) True/False: A member function of a derived class may not have the same name as a member
function of a base class. correct answers FALSE

Document information

Uploaded on
June 16, 2026
Number of pages
5
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
SirAnton
3.7
(118)
Sold
811
Followers
438
Items
40067
Last sold
1 day ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions