| 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 of the following is not type of class?

Correct Answer is : Start Class

2. Class is pass by _______

Correct Answer is : Reference

3. What is default access specifier for data members or member functions declared within a class without any specifier, in C++ ?

Correct Answer is : Private

4. Which is most appropriate comment on following class definition : class Student { int a; public : float a; };

Correct Answer is : Error : same variable name can’t be used twice

5. Which is known as generic class?

Correct Answer is : Template class

6. Size of a class is :

Correct Answer is : Classes doesn’t have any size

7. Which class can have member functions without their implementation?

Correct Answer is : Abstract class

8. Which of the following describes a friend class?

Correct Answer is : Friend class can access all the private members of the class, of which it is a friend

9. What is scope of a class nested inside another class?

Correct Answer is : Depends on access specifier and inheritance used

10. Class with main() function can be inherited (True/False)

Correct Answer is : TRUE

11. Which among the following is false, for member function of a class?

Correct Answer is : Member functions need not be declared inside the class definition

12. Which syntax for class definition is wrong?

Correct Answer is : student class{ };

13. Which of the following pairs are similar?

Correct Answer is : Class and structure

14. Which among the following is false for class features?

Correct Answer is : Class definition must be ended with a colon

15. Instance of which type of class can’t be created?

Correct Answer is : Abstract class

16. What are constant member functions?

Correct Answer is : Functions which doesn’t change value of calling object

17. Which keyword must be used to declare a member function as a constant member function?

Correct Answer is : Const

18. Which objects can call the const functions?

Correct Answer is : Both const and non-const objects

19. Non-const functions _______________________

Correct Answer is : Can be called only from non-const object

20. Which is a correct condition on const member functions?

Correct Answer is : Const member functions can’t call non-const member functions