| 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. What is size of the object of following class (64 bit system)? class student { int rollno; char name[20]; static int studentno; };

Correct Answer is : 24

2. Functions can’t return objects. (True/False)

Correct Answer is : FALSE

3. How members of an object are accessed?

Correct Answer is : Using dot operator/period symbol

4. If a local class is defined in a function, which of the following is true for an object of that class?

Correct Answer is : Object can be used/accessed/declared locally in that function.

5. Which among the following is wrong?

Correct Answer is : abstract class student{ }; student s;

6. Object declared in main() function:

Correct Answer is : Can’t be used by any other function

7. When an object is returned___________

Correct Answer is : A temporary object is created to return the value

8. Which among the following is correct?

Correct Answer is : class student{ }s1,s2; s1=s2;

9. Which among following is correct for initializing the class below? class student{ int marks; int cgpa; public: student(int i, int j){ marks=I; cgpa=j } };

Correct Answer is : student s[2]={ s(394,9), s(222,5) };

10. Object can’t be used with pointers because they belong to user defined class, and compiler can’t decide the type of data may be used inside the class. (True/False)

Correct Answer is : FALSE

11. Which was the first purely object oriented programming language developed?

Correct Answer is : SmallTalk

12. Which was the first purely object oriented programming language developed?

Correct Answer is : SmallTalk

13. Which of the following best defines a class?

Correct Answer is : Instance of an object

14. Which of the following best defines a class?

Correct Answer is : Instance of an object

15. Who invented OOP?

Correct Answer is : Alan Kay

16. Who invented OOP?

Correct Answer is : Alan Kay

17. What is the additional feature in classes that was not in structures?

Correct Answer is : Member functions

18. What is the additional feature in classes that was not in structures?

Correct Answer is : Member functions

19. Which is not feature of OOP in general definitions?

Correct Answer is : Duplicate/Redundant data

20. Which is not feature of OOP in general definitions?

Correct Answer is : Duplicate/Redundant data