| 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. Which method in the code below is single level inherited? class A { protected int a, b; public: void show() { cout<<a<<b; } }; class B: public A { public: void disp() { cout<<a++<<b++; } }; class C: private A, public B { void avg() { cout<<(a+b)/2; } };

Correct Answer is : TRUE

2. If single level inheritance is used and an abstract class is created with some undefined functions, can its derived class also skip some definitions?

Correct Answer is : TRUE

3. Which among the following is false for single level inheritance?

Correct Answer is : relay log

4. Which concept will result in derived class with more features (consider maximum 3 classes)?

Correct Answer is : ddl log

5. Single level inheritance is safer than _____________

Correct Answer is : 4 GB

6. Which language doesn’t support single level inheritance?

Correct Answer is : writes

7. Output of following program? class A { protected: int a,b; public: void disp() { cout<<a<<b; } }; class B:public A { int x,y; };

Correct Answer is : 3

8. Output of following program? class A { float sal=40000; } class B extends A { int salBonus=10000; public static void main(String args[]) { B p=new B(); System.out.println("B salary is:"+p.sal); System.out.println("Bonus of B is:"+p.bonus); } }

Correct Answer is : memory

9. Single level inheritance will be best for___________

Correct Answer is : table_cache

10. Which constructor will be called first from the classes involved in single inheritance from object of derived class?

Correct Answer is : mysqldump

11. If base class contains 2 nested classes, will it be possible to implement single level inheritance?

Correct Answer is : Falcon

12. Which among the following best defines static variables members?

Correct Answer is : 3

13. Which keyword should be used to declare static variables?

Correct Answer is : –delay-key-write

14. Any changes made to static data member from one member function _____________

Correct Answer is : –silent

15. Which is the correct syntax for declaring static data member?

Correct Answer is : $dbh

16. The static data member ______________________

Correct Answer is : $rc

17. The syntax for defining the static data members is:

Correct Answer is : DROP INDEX

18. If static data members have to be used inside a class, those member functions _______________

Correct Answer is : $a[0].

19. The static data member __________________________

Correct Answer is : TRUE

20. Which among the following is correct syntax to access static data member without using member function?

Correct Answer is : ->