C++ MCQ’s

C++ MCQ’s Home Page

C++ Basic 1
C++ Basic 2
C++ Basic 3
C++ Basic 4
C++ Basic 5
C++ OOPs Concepts 1
C++ OOPs Concepts 2
C++ OOPs Concepts 3
C++ OOPs Concepts 4
C++ OOPs Concepts 5

 

C++ Language MCQ’S | OOPs Concepts Set 2 2

6.
Which members are inherited but are not accessible in any case?

a) Private
b) Public
c) Protected
d) Both private and protected

7.
Which of the following is correct?

a) Friend functions can access public members of a class
b) Friend functions can access protected members of a class
c) Friend functions can access private members of a class
d) All of the mentioned

8.
Which of the following is correct in C++?

a) Classes cannot have protected data members
b) Structures can have member functions
c) Class members are public by default
d) Structure members are private by default

9.
Which of the following is used to make an abstract class?

a) By using virtual keyword in front of a class declaration
b) By using an abstract keyword in front of a class declaration
c) By declaring a virtual function in a class
d) By declaring a pure virtual function in a class

10.
Which of the following is correct?

a) A class is an instance of its objects
b) An object is an instance of its class
c) A class is an instance of the data type that the class have
d) An object is an instance of the data type of the class