

MCQOPTIONS
Saved Bookmarks
This section includes 34 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
Does OOP provide better security than POP? |
A. | Always true for any programming language |
B. | May not be true with respect to all programming languages |
C. | It depends on type of program |
D. | It’s vice-versa is true |
Answer» B. May not be true with respect to all programming languages | |
2. |
Which among the following, for a pure OOP language, is true? |
A. | The language should follow 3 or more features of OOP |
B. | The language should follow at least 1 feature of OOP |
C. | The language must follow only 3 features of OOP |
D. | The language must follow all the rules of OOP |
Answer» E. | |
3. |
Exception handling is a feature of OOP. |
A. | True |
B. | False |
Answer» B. False | |
4. |
Which among doesn’t illustrates polymorphism? |
A. | Function overloading |
B. | Function overriding |
C. | Operator overloading |
D. | Virtual function |
Answer» C. Operator overloading | |
5. |
Which feature in OOP is used to allocate additional function to a predefined operator in any language? |
A. | Operator Overloading |
B. | Function Overloading |
C. | Operator Overriding |
D. | Function Overriding |
Answer» B. Function Overloading | |
6. |
___________ underlines the feature of Polymorphism in a class. |
A. | Nested class |
B. | Enclosing class |
C. | Inline function |
D. | Virtual Function |
Answer» E. | |
7. |
The feature by which one object can interact with another object is _____________ |
A. | Data transfer |
B. | Data Binding |
C. | Message Passing |
D. | Message reading |
Answer» D. Message reading | |
8. |
How many basic features of OOP are required for a programming language to be purely OOP? |
A. | 7 |
B. | 6 |
C. | 5 |
D. | 4 |
Answer» B. 6 | |
9. |
Which feature may be violated if we don’t use classes in a program? |
A. | Inheritance can’t be implemented |
B. | Object must be used is violated |
C. | Encapsulation only is violated |
D. | Basically all the features of OOP gets violated |
Answer» E. | |
10. |
Which among the following doesn’t come under OOP concept? |
A. | Platform independent |
B. | Data binding |
C. | Message passing |
D. | Data hiding |
Answer» B. Data binding | |
11. |
Which of the following is not a feature of pure OOP? |
A. | Classes must be used |
B. | Inheritance |
C. | Data may/may not be declared using object |
D. | Functions Overloading |
Answer» D. Functions Overloading | |
12. |
If different properties and functions of a real world entity is grouped or embedded into a single element, what is it called in OOP language? |
A. | Inheritance |
B. | Polymorphism |
C. | Abstraction |
D. | Encapsulation |
Answer» E. | |
13. |
If a function can perform more than 1 type of tasks, where the function name remains same, which feature of OOP is used here? |
A. | Encapsulation |
B. | Inheritance |
C. | Polymorphism |
D. | Abstraction |
Answer» D. Abstraction | |
14. |
Which feature of OOP indicates code reusability? |
A. | Encapsulation |
B. | Inheritance |
C. | Abstraction |
D. | Polymorphism |
Answer» C. Abstraction | |
15. |
Exception handling is feature of OOP. State True or False. |
A. | True |
B. | False |
C. | May be |
D. | Can't say |
Answer» B. False | |
16. |
Find the output of the program: |
A. | Its school education system |
B. | Its education system |
C. | Its school education systemIts education system |
D. | Its education systemIts school education system |
Answer» B. Its education system | |
17. |
Which feature of OOP is indicated by the following code? |
A. | Inheritance |
B. | Polymorphism |
C. | Inheritance and polymorphism |
D. | Encapsulation and Inheritance |
Answer» E. | |
18. |
Which among following is correct for initializing the class below? |
A. | student s[3]={ s(394, 9); s(394, 9); s(394,9); }; |
B. | student s[2]={ s(394,9), s(222,5) }; |
C. | student s[2]={ s1(392,9), s2(222,5) }; |
D. | student s[2]={ s[392,9], s2[222,5] }; |
Answer» C. student s[2]={ s1(392,9), s2(222,5) }; | |
19. |
What is output of the following program? |
A. | Its base classIts derived class |
B. | Its base class Its derived class |
C. | Its derived classIts base class |
D. | Its derived class Its base class |
Answer» B. Its base class Its derived class | |
20. |
Which class/set of classes can illustrate polymorphism in the following code: |
A. | Only class student can show polymorphism |
B. | Only class student and topper together can show polymorphism |
C. | All class student, topper and average together can show polymorphism |
D. | Class failed should also inherit class student for this code to work for polymorphism |
Answer» D. Class failed should also inherit class student for this code to work for polymorphism | |
21. |
Which among the following can show polymorphism? |
A. | Overloading || |
B. | Overloading += |
C. | Overloading << |
D. | Overloading && |
Answer» D. Overloading && | |
22. |
Consider the following code and select the correct option: |
A. | This code is good to go |
B. | This code may result in undesirable conditions |
C. | This code will generate error |
D. | This code violates encapsulation |
Answer» E. | |
23. |
Consider the code and select the wrong choice: |
A. | This maintains encapsulation |
B. | This code doesn’t maintain encapsulation |
C. | This code is vulnerable |
D. | This code gives error |
Answer» B. This code doesn’t maintain encapsulation | |
24. |
Which is most appropriate comment on following class definition : |
A. | Error : same variable name can’t be used twice |
B. | Error : Public must come first |
C. | Error : data types are different for same variable |
D. | It is correct |
Answer» B. Error : Public must come first | |
25. |
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. State True or False. |
A. | True |
B. | False |
C. | May be |
D. | Can't say |
Answer» C. May be | |
26. |
What is size of the object of following class (64 bit system)?class student { int rollno; char name[20]; static int studentno; }; |
A. | 20 |
B. | 22 |
C. | 24 |
D. | 28 |
Answer» D. 28 | |
27. |
State True or False. Class with main() function can be inherited. |
A. | True |
B. | False |
C. | May be |
D. | Can't say |
Answer» B. False | |
28. |
Functions can’t return objects. State True or False. |
A. | True |
B. | False |
C. | May be |
D. | Can't say |
Answer» C. May be | |
29. |
HOW_MANY_BASIC_FEATURES_OF_OOP_ARE_REQUIRED_FOR_A_PROGRAMMING_LANGUAGE_TO_BE_PURELY_OOP??$ |
A. | 7 |
B. | 6 |
C. | 5 |
D. | 4 |
Answer» D. 4 | |
30. |
___________ underlines the feature of Polymorphism in a class.$ |
A. | Nested class |
B. | Enclosing class |
C. | Inline function |
D. | Virtual Function |
Answer» B. Enclosing class | |
31. |
The feature by which one object can interact with another object is:$ |
A. | Data transfer |
B. | Data Binding |
C. | Message Passing |
D. | Message reading |
Answer» E. | |
32. |
Which among doesn’t illustrates polymorphism?$ |
A. | Function overloading |
B. | Function overriding |
C. | Operator overloading |
D. | Virtual function |
Answer» B. Function overriding | |
33. |
Which feature may be violated if we don’t use classes in a program?# |
A. | Inheritance can’t be implemented |
B. | Object must be used is violated |
C. | Encapsulation only is violated |
D. | Basically all the features of OOP gets violated |
Answer» B. Object must be used is violated | |
34. |
Which among the following doesn’t come under OOP concept?$ |
A. | Platform independent |
B. | Data binding |
C. | Message passing |
D. | Data hiding |
Answer» B. Data binding | |