Exam 13: Introduction to Classes

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What is the output of the following program? What is the output of the following program?

Free
(Multiple Choice)
4.9/5
(84)
Correct Answer:
Verified

D

You must use the private access specification for all data members of a class.

Free
(True/False)
4.9/5
(80)
Correct Answer:
Verified

False

The destructor function's return type is ________.

Free
(Multiple Choice)
4.7/5
(85)
Correct Answer:
Verified

D

If you do not declare an access specification, the default for members of a class is ________.

(Multiple Choice)
4.7/5
(75)

When using smart pointers to dynamically allocate objects in C++ 11, it is unnecessary to delete the dynamically allocated objects because the smart pointer will automatically delete them.

(True/False)
4.8/5
(85)

A class is a(n)________ that is defined by the programmer.

(Multiple Choice)
4.9/5
(72)

A class may have this many default constructor(s).

(Multiple Choice)
4.8/5
(84)

What is the output of the following program? What is the output of the following program?

(Multiple Choice)
4.9/5
(74)

In OOP terminology, an object's member variables are often called its ________, and its member functions are sometimes referred to as its behaviors, or ________.

(Multiple Choice)
4.9/5
(69)

Object-oriented programming is centered around the object, which encapsulate together both the data and the functions that operate on the data.

(True/False)
4.7/5
(76)

This directive is used to create an "include guard," which allows a program to be conditionally compiled. This prevents a header file from accidentally being included more than once.

(Multiple Choice)
4.9/5
(83)

One purpose that destructor functions are often used for is to free memory that was allocated by the object.

(True/False)
4.8/5
(74)

More than one constructor function may be defined for a class.

(True/False)
4.9/5
(80)

This type of member function may be called from a statement outside the class.

(Multiple Choice)
4.8/5
(78)

When a member function is defined outside of the class declaration, the function name must be qualified with the ________.

(Multiple Choice)
4.8/5
(78)

This is automatically called when an object is destroyed.

(Multiple Choice)
4.9/5
(73)

Class declarations are usually stored here.

(Multiple Choice)
4.9/5
(78)

One purpose that constructor functions are often used for is to allocate memory that will be needed by the object.

(True/False)
4.9/5
(71)

A destructor function can have zero to many parameters.

(True/False)
4.8/5
(87)

A ________ is a member function that is automatically called when a class object is ________.

(Multiple Choice)
4.8/5
(70)
Showing 1 - 20 of 47
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)