C++ Programming MCQs

1) Choose the pure virtual function definition from the following.

A. virtual void f()=0 { }

B. void virtual f()=0 { }

C. virtual void f() {} = 0;

D. None of the above.

Answer : D

2) Which data type can be used to hold a wide character in C++?

A. unsigned char;

B. int

C. wchar_t

D. none of the above.

Answer : C

3) Which is the storage specifier used to modify the member variable even though the class object is a constant object?

A. auto

B. register

C. static

D. mutable

Answer : D

4) Designer of C++ programming language.

A. Charles Babbage

B. Dennis Ritchie

C. Brain Kernighan

D. Bjarne Stroustrup

Answer : D

5) Which feature of the OOPS gives the concept of reusability?

A. Abstraction

B. Encapsulation

C. Inheritance

D. None of the above.

Answer : C

error: Content is protected !!