a. Procedure Oriented language.
b. Object-based language
c. If classes are supported, polymorphism will always be supported
d. Object-based language
The correct option is (d)
Explanation:
Explanation:The languages which support classes but doesn’t support polymorphism, are known as object-based languages. Polymorphism is such an important feature, that is a language doesn’t support this feature, it can’t be called as a OOP language.
a. Java
b. C++
c. Ada.
d. SmallTalk
Show Answer
The correct option is (c)
Explanation:
Ada is the language which supports the concept of the classes but doesn’t support the polymorphism feature. It is an object-based programming language. Note that it is not an OOP language..
3. Which type of function among the following shows polymorphism?
a. Class member functions.
b. Inline function.
c. Undefined functions.
d. Virtual function
Show Answer
The correct option is (d)
Explanation:
Only virtual functions among these can show polymorphism.
4. Which among the following can’t be used for polymorphism?
a. Member functions overloading
b. Predefined operator overloading
c. Constructor overloading
d. Static member functions
Show Answer
The correct option is (d)
Explanation:
Static member functions are not property of any object.
5. Compile time polymorphism in C++ programming are ?
a. Function overloading
b. Operator overloading
c. Function overriding
d. a & b
Show Answer
The correct option is (d)
Explanation:
No Explanation
6. C++ abstract class can contain ?
a. Only pure virtual function
b. Non-virtual function.
c. Both pure virtual and non-virtual function
d. Pure virtual function
Show Answer
The correct option is (c)
Explanation:
No Explanation
7. Which of the following cannot be overloaded in C++?
a. Constructor
b. Destructor
c. New and delete operator
d. Increment operator
Show Answer
The correct option is (b)
Explanation:
No Explanation
8. Classes that can be used to instantiate objects are called?
a. interface.
b. abstract class
c. concrete classes
d. None of the above
Show Answer
The correct option is (c)
Explanation:
Classes that can be used to instantiate objects are called concrete classes.
9. Which of the following is true?
a. The purpose of an abstract class is to provide an appropriate base class from which other classes can inherit.
b. Abstract classes cannot be used to instantiate objects and serves only as an interface
c. The C++ interfaces are implemented using abstract classes
d. All of the mentioned
Show Answer
The correct option is (d)
Explanation:
All the above mention is true
10. Where does the abstract class is used?
a. both derived & base class
b. derived class
c. base class only
d. virtual class
Show Answer
The correct option is (c)
Explanation:
As base class only as it helps in encapsulation of similar functioning of derived classes.