Programming In C++ (3330702) MCQs

MCQs of Inheritance

Showing 31 to 34 out of 34 Questions
31.

 Where does the abstract class is used?

(abstract class નો ઉપયોગ ક્યાં થાય છે?)

(a)

base class only

 

(b)

derived class

 

(c)

both derived & base class

 

(d)

virtual class

 

Answer:

Option (a)

32.

 What is an abstract class in C++?

(C++ માં એક abstract class શું છે?)

(a)

Class specifically used as a base class with atleast one virtual functions

(ઓછામાં ઓછું એક virtual functions સાથેનો base class તરીકેનો Class )

(b)

Class specifically used as a base class with atleast one pure virtual functions

(ઓછામાં ઓછા એક pure virtual functions સાથેનો base class તરીકેનો Class )

(c)

 Class from which any class is derived

(એવો Class કે જેમાંથી કોઈપણ class derived કરવામાં આવ્યો છે)

(d)

Any Class in C++ is an abstract class

(C++ માં કોઈપણ class એ એક abstract class છે)

Answer:

Option (b)

33.

Can we create object of Abstract class?

(શું આપણે Abstract class નો object બનાવી શકીએ?)

(a)

Yes

 

(b)

No

 

Answer:

Option (b)

34.

If a function has to be called only by using other member functions of the class, what should be the access specifier used for that function

(જો ફંક્શન ને ફક્ત class ના અન્ય member functions નો ઉપયોગ કરીને call કરવાનું હોય, તો તે function માટે access specifier  શું હોવું જોઈએ?)

(a)

Private

 

(b)

Protected

 

(c)

Public

 

(d)

Default

 

Answer:

Option (a)

Showing 31 to 34 out of 34 Questions