Exam 9: Classes

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

Returning references to non-const, private data:

Free
(Multiple Choice)
4.8/5
(39)
Correct Answer:
Verified

C

Utility functions:

Free
(Multiple Choice)
4.8/5
(47)
Correct Answer:
Verified

A

Member access specifiers public and private) can appear:

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

A

When compiling a class's source code file which does not contain a main function), the information in the class's header file is used for all of the following, except:

(Multiple Choice)
4.9/5
(43)

Member function definitions:

(Multiple Choice)
4.9/5
(40)

Parameterized stream manipulator setfill specifies the fill character that's displayed when an output is displayed in a field wider than the number of characters or digits in the output. The effect of setfill applies:

(Multiple Choice)
4.9/5
(37)

Calling a member function of an object requires which item?

(Multiple Choice)
4.9/5
(36)

Which of the following statements is not true of a destructor? a. It performs termination housekeeping. b. It's called before the system reclaims the object's memory. c. If the programmer does not explicitly provide a destructor, the compiler creates an "empty" destructor. d. It releases the object's memory.

(Short Answer)
4.8/5
(36)

Attributes of a class are also known as:

(Multiple Choice)
4.8/5
(30)

A class-scope variable hidden by a block-scope variable can be accessed by preceding the variable name with the class name followed by:

(Multiple Choice)
4.7/5
(36)

In the source-code file containing a class's member function definitions, each member function definition must be tied to the class definition by preceding the member function name with the class name and ::, which is known as the:

(Multiple Choice)
4.8/5
(37)

If a member function of a class already provides all or part of the functionality required by a constructor or another member function then:

(Multiple Choice)
4.7/5
(40)

Which of the following statements is not true of a constructor and destructor of the same class?

(Multiple Choice)
4.9/5
(36)

When independent software vendors provide class libraries to clients, they typically give the __________ for the class's interface and the __________ for the class's implementation.

(Multiple Choice)
4.8/5
(27)

A constructor can specify the return type:

(Multiple Choice)
4.9/5
(37)

Classes cannot:

(Multiple Choice)
4.9/5
(41)

All of the following are true about classes, except:

(Multiple Choice)
4.8/5
(39)

Given the class definition: Class CreateDestroy { Public: CreateDestroy) { cout << "constructor called, "; } ~CreateDestroy) { cout << "destructor called, "; } }; What will the following program output? Int main) { For int i = 1; i <= 2; i++ ) CreateDestroy cd; Return 0; }

(Multiple Choice)
4.8/5
(42)

Assuming that Grades.h is found in the current directory and the iostream header file is found in the C++ Standard Library header file directory, which of the following preprocessor directives will fail to find its desired header file?

(Multiple Choice)
4.7/5
(29)

Which of the following preprocessor directives does not constitute part of the preprocessor wrapper?

(Multiple Choice)
4.9/5
(37)
Showing 1 - 20 of 35
close modal

Filters

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