Cplusplus Programming Inheritance 1 Online Exam Quiz

Cplusplus Programming Inheritance 1 GK Quiz. Question and Answers related to Cplusplus Programming Inheritance 1. MCQ (Multiple Choice Questions with answers about Cplusplus Programming Inheritance 1

How many specifiers are used to derive a class?

Options

A : 1

B : 2

C : 3

D : 4

View Answer

What is a pure virtual function?

Options

A : A virtual function defined inside the base class

B : A virtual function that has no definition relative to the base class

C : A virtual function that is defined inside the derived class

D : Any function that is made virtual

View Answer

What is a virtual function in C++?

Options

A : Any member function of a class

B : All functions that are derived from the base class

C : All the members that are accessing base class data members

D : All the functions which are declared in the base class and is re-defined/overridden by the derived class

View Answer

The concept of deciding which function to invoke during runtime is called ______________________

Options

A : late binding

B : dynamic linkage

C : static binding

D : both late binding and dynamic linkage

View Answer

If a class is derived privately from a base class then ______________________________

Options

A : no members of the base class is inherited

B : all members are accessible by the derived class

C : all the members are inherited by the class but are hidden and cannot be accessible

D : no derivation of the class gives an error

View Answer

Which specifier makes all the data members and functions of base class inaccessible by the derived class?

Options

A : private

B : protected

C : public

D : both private and protected

View Answer

Which statement is incorrect about virtual function.

Options

A : They are used to achieve runtime polymorphism

B : They are used to hide objects

C : Each virtual function declaration starts with the virtual keyword

D : All of the mentioned

View Answer

Which is the correct syntax of declaring a virtual function?

Options

A : virtual int func();

B : virtual int func(){};

C : inline virtual func();

D : inline virtual func(){};

View Answer

What is Inheritance in C++?

Options

A : Wrapping of data into a single class

B : Deriving new classes from existing classes

C : Overloading of classes

D : Classes with same names

View Answer

Chemical Engineering Basics - Part 1 more Online Exam Quiz

Cplusplus Programming Function Objects

Cplusplus Programming Functions

Cplusplus Programming Function Templates 2

Cplusplus Programming Functors

Cplusplus Programming Generators

Cplusplus Programming Inheritance 2

Cplusplus Programming Iterators

Cplusplus Programming Lambda Expressions

Cplusplus Programming More Containers

Cplusplus Programming Namespaces 2