| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. If a base class is being derived by two other classes, which inheritance will that be called?

Correct Answer is : Hierarchical

2. Which among the following must be in a base class?

Correct Answer is : Nothing

3. Which type of members can’t be accessed in derived classes of a base class?

Correct Answer is : Private

4. If a class is enclosing more than one class, than it can be called as base class of those classes.

Correct Answer is : FALSE

5. Base class have ________________ of abstraction.

Correct Answer is : Lower degree

6. Always the base class constructors are called ___________ constructor of derived class.

Correct Answer is : Before

7. Can we call methods of base class using constructor of the derived class?

Correct Answer is : Yes, always

8. If a base class is inherited from another class and then one class derives it, which inheritance is shown?

Correct Answer is : Multi-level

9. How many base classes can a single derived class have in C++?

Correct Answer is : As many as required

10. If a base class is added with few new members, its subclass must also be modified. (True/False)

Correct Answer is : FALSE

11. Which among the following is true for class exceptions?

Correct Answer is : Both base class and derived class may produce exceptions

12. If both base and derived class caught exceptions ______________

Correct Answer is : Then catch block of derived class must be defined before base class

13. Which among the following is true?

Correct Answer is : If catch block of base class is written first, derived class catch block can’t be reached

14. The catching of base class exception ___________________________ in java.

Correct Answer is : Before derived class is not allowed by compiler

15. If catching of base class exception is done before derived class in C++ ________________

Correct Answer is : It may give warning but not error

16. How many catch blocks can a class have?

Correct Answer is : As many as required

17. Since which version of java is multiple exception catch was made possible?

Correct Answer is : Java 7

18. To catch more than one exception in one catch block, how are the exceptions separated in the syntax?

Correct Answer is : Vertical bar

19. If a catch block accepts more than one exceptions then __________________

Correct Answer is : The catch parameters are final

20. Which among the following handles the undefined class in program?

Correct Answer is : ClassNotFoundException