Object Oriented Programming interview questions part 1
Object Oriented Programming interview questions part 1
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which specifier applies only to the constructors?
Correct Answer is : Explicit
2. In OOPS unit of data is called as
Correct Answer is : Structures
3. OOP allows for extension of the objects functions or of class functions. This is called as
Correct Answer is : Scalability
4. Which of the following is not a type of object oriented abstraction?
Correct Answer is : Abstraction of name
5. What are the major elements in an object model?
Correct Answer is : Abstraction, encapsulation and hierarchy
6. Which among the following best describes abstract classes?
Correct Answer is : If a class has at least one pure virtual function, it’s abstract class
7. Can abstract class have main() function defined inside it?
Correct Answer is : Yes, always
8. If there is an abstract method in a class then, ________________
Correct Answer is : Class must be abstract class
9. If a class is extending/inheriting another abstract class having abstract method, then _______________________
Correct Answer is : Either implementation of method or making class abstract is mandatory
10. Abstract class A has 4 virtual functions. Abstract class B defines only 2 of those member functions as it extends class A. Class C extends class B and implements the other two member functions of class A. Choose the correct option below.
Correct Answer is : Program runs correctly
11. Abstract classes can ____________________ instances.
Correct Answer is : Never have
12. We ___________________ to an abstract class.
Correct Answer is : Can create pointers or references
13. Which among the following is an important use of abstract classes?
Correct Answer is : Class Libraries
14. Use of pointers or reference to an abstract class gives rise to which among the following feature?
Correct Answer is : Runtime polymorphism
15. The abstract classes in java can _________________
Correct Answer is : Implement constructors
16. Abstract class can’t be final in java.
Correct Answer is : TRUE
17. Can abstract classes have static methods (Java)?
Correct Answer is : Yes, always
18. It is _________________________ to have an abstract method.
Correct Answer is : Not mandatory for an abstract class
19. How many abstract classes can a single program contain?
Correct Answer is : As many as required
20. Is it necessary that all the abstract methods must be defined from an abstract class?