C++ Interview Questions and Answers Pdf - 2

Question: 6

What are the advantages of object oriented programming?

Class data type allows programs to organize as objects that contain both data and functions.

Data hiding or Abstraction of data provides security to data, as unrelated member functions cannot access its data.

Polymorphism promotes, reduces software complexity, as multiple definitions are permitted to an operator or function.

Inheritance allows a class to be derived from an existing class, thus promoting reusability of code.

Question: 7

What sort of software is used to solve any specific problem?

The application software is used to solve any specific problem.

Question: 8

What is polymorphism?

The ability of an object to respond differently to different messages is called polymorphism.

Question: 9

How is polymorphism different from inheritance?

Polymorphism promotes, reduces software complexity, as multiple definitions are permitted to an operator or function.

Inheritance allows a class to be derived from an existing class thus promoting reusability of code.

Related Questions