Classes and Objects in C++ Programming Questions and Answers - 2

Question: 6

_____ of a class are data variables that represent the features or properties of a class.

(A) Access specifiers

(B) Visibility labels

(C) Member functions

(D) Data members

Ans: D

Data members

Question: 7

Declaration and function definitions are two specifications of which of the following

(A) Comments

(B) Class

(C) Data type

(D) None of the given

Ans: B

Class

Question: 8

The members that can also be accessed from outside the class should be declared as

(A) Protected

(B) Private

(C) Public

(D) None of these

Ans: C

Public

Question: 9

Members of a class are classified as

(A) Data functions and member functions

(B) Data hiding and data abstraction

(C) Data variables and data hiding

(D) Data members and member function

Ans: D

Data members and member function

Question: 10

void sum:: input ()
The above line tells

(A) function input is sub function of sum

(B) function sum is sub function of input

(C) function input is declared within the class sum

(D) function sum is declared within the class input

Ans: C

function input is declared within the class sum

Related Questions