Classes and Objects MCQ Questions and Answers - 2

Question: 6

Private access specifier is accessible by special function called ____

(A) Void

(B) Inline

(C) Friend

(D) All of these

Ans: C

Friend

Question: 7

_____  member variable are initialized only once when the first object of its class is created.

(A) Inline

(B) Static

(C) Private

(D) Public

Ans: B

Static

Question: 8

One copy of ___ data members of a class are shared by all objects of that class.

(A) Public

(B) Static

(C) Private

(D) Inline

Ans: B

Static

Question: 9

The members defined within the class behave like ____functions.

(A) Inline

(B) Public

(C) Friend

(D) None of these

Ans: A

Inline

Question: 10

:: is a ___

(A) Short circuit AND

(B) Short circuit OR

(C) Not operator

(D) Scope resolution operator

Ans: D

Scope resolution operator

Related Questions