InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
___________ underlines the feature of Polymorphism in a class.(a) Nested class(b) Enclosing class(c) Inline function(d) Virtual FunctionThe question was posed to me during an online exam.Asked question is from OOPs Features topic in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct option is (d) VIRTUAL FUNCTION |
|
| 52. |
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 OOPThis question was addressed to me during an interview.I'd like to ask this question from OOPs Features topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct answer is (d) The LANGUAGE must follow all the RULES of OOP |
|
| 53. |
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 OverridingI got this question in an internship interview.The doubt is from OOPs Features topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» Right option is (a) OPERATOR Overloading |
|
| 54. |
Exception handling is a feature of OOP.(a) True(b) FalseI got this question in semester exam.The question is from OOPs Features topic in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct option is (a) True |
|
| 55. |
Which among doesn’t illustrates polymorphism?(a) Function overloading(b) Function overriding(c) Operator overloading(d) Virtual functionThe question was posed to me in exam.Origin of the question is OOPs Features topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct ANSWER is (B) Function overriding |
|
| 56. |
Which among the following is the language which supports classes but not polymorphism?(a) SmallTalk(b) Java(c) C++(d) AdaI have been asked this question during an online exam.Question is taken from Polymorphism in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» Right choice is (d) Ada |
|
| 57. |
Which among the following best describes polymorphism?(a) It is the ability for a message/data to be processed in more than one form(b) It is the ability for a message/data to be processed in only 1 form(c) It is the ability for many messages/data to be processed in one way(d) It is the ability for undefined message/data to be processed in at least one wayI have been asked this question in an interview.This intriguing question comes from Polymorphism in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» RIGHT choice is (a) It is the ability for a message/data to be processed in more than one form The EXPLANATION is: It is actually the ability for a message / data to be processed in more than one form. The word polymorphism INDICATES many-forms. So if a single ENTITY takes more than one form, it is known as polymorphism. |
|
| 58. |
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 trueI had been asked this question in class test.My doubt is from OOPs Features in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» Right CHOICE is (a) Always TRUE for any programming language |
|
| 59. |
What do you call the languages that support classes but not polymorphism?(a) Class based language(b) Procedure Oriented language(c) Object-based language(d) If classes are supported, polymorphism will always be supportedI had been asked this question in examination.This key question is from Polymorphism topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» CORRECT choice is (c) Object-based LANGUAGE Explanation: The languages which support classes but doesn’t support POLYMORPHISM, are known as object-based languages. Polymorphism is such an important FEATURE, that is a language doesn’t support this feature, it can’t be called as a OOP language. |
|
| 60. |
If same message is passed to objects of several different classes and all of those can respond in a different way, what is this feature called?(a) Inheritance(b) Overloading(c) Polymorphism(d) OverridingI had been asked this question in an internship interview.My question comes from Polymorphism topic in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct choice is (c) Polymorphism |
|
| 61. |
In case of using abstract class or function overloading, which function is supposed to be called first?(a) Local function(b) Function with highest priority in compiler(c) Global function(d) Function with lowest priority because it might have been halted since long time, because of low priorityI have been asked this question in examination.My question comes from Polymorphism in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct answer is (b) Function with highest priority in compiler |
|
| 62. |
Which type of function among the following shows polymorphism?(a) Inline function(b) Virtual function(c) Undefined functions(d) Class member functionsThis question was posed to me by my college professor while I was bunking the class.The origin of the question is Polymorphism in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» RIGHT CHOICE is (b) VIRTUAL function The best explanation: Only virtual functions among these can show polymorphism. Class MEMBER functions can show polymorphism too but we should be sure that the same function is being overloaded or is a function of abstract class or something LIKE this, since we are not sure about all these, we can’t say whether it can show polymorphism or not. |
|
| 63. |
Which among the following can’t be used for polymorphism?(a) Static member functions(b) Member functions overloading(c) Predefined operator overloading(d) Constructor overloadingI got this question during an online exam.This interesting question is from Polymorphism topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct choice is (a) STATIC member FUNCTIONS |
|
| 64. |
Which among the following can show polymorphism?(a) Overloading ||(b) Overloading +=(c) Overloading |
|
Answer» The correct ANSWER is (c) Overloading << |
|
| 65. |
Which problem may arise if we use abstract class functions for polymorphism?(a) All classes are converted as abstract class(b) Derived class must be of abstract type(c) All the derived classes must implement the undefined functions(d) Derived classes can’t redefine the functionThe question was posed to me in final exam.The doubt is from Polymorphism topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct option is (c) All the derived CLASSES must implement the undefined functions |
|
| 66. |
Polymorphism is possible in C language.(a) True(b) FalseI have been asked this question at a job interview.The doubt is from Polymorphism in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct choice is (a) True |
|
| 67. |
Which among the following is not true for polymorphism?(a) It is feature of OOP(b) Ease in readability of program(c) Helps in redefining the same functionality(d) Increases overhead of function definition alwaysI have been asked this question in exam.My query is from Polymorphism topic in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct ANSWER is (d) Increases overhead of FUNCTION definition always |
|
| 68. |
If 2 classes derive one base class and redefine a function of base class, also overload some operators inside class body. Among these two things of function and operator overloading, where is polymorphism used?(a) Function overloading only(b) Operator overloading only(c) Both of these are using polymorphism(d) Either function overloading or operator overloading because polymorphism can be applied only once in a programI had been asked this question in a national level competition.The above asked question is from Polymorphism topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct choice is (d) Either FUNCTION overloading or operator overloading because POLYMORPHISM can be applied only once in a program |
|
| 69. |
Which among the following best describes encapsulation?(a) It is a way of combining various data members into a single unit(b) It is a way of combining various member functions into a single unit(c) It is a way of combining various data members and member functions into a single unit which can operate on any data(d) It is a way of combining various data members and member functions that operate on those data members into a single unitThe question was posed to me during an interview.My enquiry is from Encapsulation topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» Right choice is (d) It is a way of COMBINING various data members and member functions that OPERATE on those data members into a single UNIT |
|
| 70. |
If data members are private, what can we do to access them from the class object?(a) Create public member functions to access those data members(b) Create private member functions to access those data members(c) Create protected member functions to access those data members(d) Private data members can never be accessed from outside the classI have been asked this question in an interview.The question is from Encapsulation in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct answer is (a) Create PUBLIC member functions to access those data members |
|
| 71. |
Find which of the following uses encapsulation?(a) void main(){int a;void fun( int a=10;cout |
|
Answer» The correct option is (c) class student{INT a; PUBLIC: void disp(){ cout< |
|
| 72. |
While using encapsulation, which among the following is possible?(a) Code modification can be additional overhead(b) Data member’s data type can be changed without changing any other code(c) Data member’s type can’t be changed, or whole code have to be changed(d) Member functions can be used to change the data type of data membersThis question was addressed to me during an interview.My question is based upon Encapsulation in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct option is (b) Data member’s data TYPE can be changed without changing any other code |
|
| 73. |
Which feature can be implemented using encapsulation?(a) Inheritance(b) Abstraction(c) Polymorphism(d) OverloadingThe question was posed to me in an international level competition.I would like to ask this question from Encapsulation topic in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» Right option is (B) ABSTRACTION |
|
| 74. |
Encapsulation helps in writing ___________ classes in java.(a) Mutable(b) Abstract(c) Wrapper(d) ImmutableI have been asked this question during an internship interview.Asked question is from Encapsulation in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» CORRECT answer is (d) IMMUTABLE Easy explanation - Immutable classes are USED for caching purpose GENERALLY. And it can be created by making the CLASS as final and making all its members private. |
|
| 75. |
Which among the following should be encapsulated?(a) The data which is prone to change is near future(b) The data prone to change in long terms(c) The data which is intended to be changed(d) The data which belongs to some other classThe question was asked during a job interview.Asked question is from Encapsulation topic in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct answer is (a) The data which is prone to CHANGE is near FUTURE |
|
| 76. |
How can Encapsulation be achieved?(a) Using Access Specifiers(b) Using only private members(c) Using inheritance(d) Using AbstractionI have been asked this question in an international level competition.This is a very interesting question from Encapsulation in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct answer is (a) USING Access Specifiers |
|
| 77. |
Which among the following violates the principle of encapsulation almost always?(a) Local variables(b) Global variables(c) Public variables(d) Array variablesI got this question at a job interview.My query is from Encapsulation in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct answer is (b) Global variables |
|
| 78. |
Which among the following would destroy the encapsulation mechanism if it was allowed in programming?(a) Using access declaration for private members of base class(b) Using access declaration for public members of base class(c) Using access declaration for local variable of main() function(d) Using access declaration for global variablesI had been asked this question during an interview for a job.This intriguing question comes from Encapsulation topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» RIGHT option is (a) Using access declaration for private MEMBERS of base class The best I can explain: If using access declaration for private members of base class was allowed in programming, it would have destroyed whole CONCEPT of encapsulation. As if it was possible, any class which gets inherited PRIVATELY, would have been able to inherit the private members of base class, and hence could access each and EVERY member of base class. |
|
| 79. |
Which among the following can be a concept against encapsulation rules?(a) Using function pointers(b) Using char* string pointer to be passed to non-member function(c) Using object array(d) Using any kind of pointer/array address in passing to another functionI had been asked this question by my school teacher while I was bunking the class.My question is taken from Encapsulation in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct choice is (d) Using any kind of pointer/array address in passing to ANOTHER function |
|
| 80. |
Encapsulation is the way to add functions in a user defined structure.(a) True(b) FalseThe question was asked in an interview.The query is from Encapsulation topic in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct option is (B) False |
|
| 81. |
Using encapsulation data security is ___________(a) Not ensured(b) Ensured to some extent(c) Purely ensured(d) Very lowThis question was posed to me by my college director while I was bunking the class.I'm obligated to ask this question of Encapsulation topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» Right choice is (b) ENSURED to some extent |
|
| 82. |
Which among the following best defines abstraction?(a) Hiding the implementation(b) Showing the important data(c) Hiding the important data(d) Hiding the implementation and showing only the featuresThe question was posed to me in final exam.My doubt stems from Abstraction topic in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct option is (d) Hiding the implementation and showing only the features |
|
| 83. |
Hiding the implementation complexity can ____________(a) Make the programming easy(b) Make the programming complex(c) Provide more number of features(d) Provide better featuresI have been asked this question during a job interview.The doubt is from Abstraction topic in portion OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct ANSWER is (a) Make the programming EASY |
|
| 84. |
Object is ________ abstraction.(a) Object(b) Logical(c) Real(d) HypotheticalThe question was posed to me in an online interview.The doubt is from Abstraction topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» The CORRECT option is (c) Real |
|
| 85. |
Class is _________ abstraction.(a) Object(b) Logical(c) Real(d) HypotheticalI got this question in examination.This interesting question is from Abstraction topic in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct option is (b) LOGICAL |
|
| 86. |
Abstraction gives higher degree of ________(a) Class usage(b) Program complexity(c) Idealized interface(d) Unstable interfaceI got this question in an international level competition.This intriguing question originated from Abstraction topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct choice is (c) IDEALIZED interface |
|
| 87. |
Abstraction can apply to ____________(a) Control and data(b) Only data(c) Only control(d) ClassesThis question was posed to me in an online quiz.My question is based upon Abstraction in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» RIGHT answer is (a) CONTROL and DATA Easy explanation - Abstraction applies to both. Control abstraction involves use of subroutines and control FLOW abstraction. Data abstraction involves handling PIECES of data in meaningful ways. |
|
| 88. |
Which among the following can be viewed as combination of abstraction of data and code.(a) Class(b) Object(c) Inheritance(d) InterfacesThis question was posed to me in final exam.The query is from Abstraction topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct option is (B) OBJECT |
|
| 89. |
Abstraction principle includes___________(a) Use abstraction at its minimum(b) Use abstraction to avoid longer codes(c) Use abstraction whenever possible to avoid duplication(d) Use abstraction whenever possible to achieve OOPThis question was posed to me during an online exam.My question is based upon Abstraction topic in chapter OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct answer is (c) Use abstraction whenever possible to avoid duplication |
|
| 90. |
Higher the level of abstraction, higher are the details.(a) True(b) FalseThis question was posed to me during an online exam.My doubt is from Abstraction in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» The CORRECT answer is (B) False |
|
| 91. |
Encapsulation and abstraction differ as ____________(a) Binding and Hiding respectively(b) Hiding and Binding respectively(c) Can be used any way(d) Hiding and hiding respectivelyThe question was posed to me in class test.Query is from Abstraction topic in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct OPTION is (a) BINDING and HIDING respectively |
|
| 92. |
A phone is made up of many components like motherboard, camera, sensors and etc. If the processor represents all the functioning of phone, display shows the display only, and the phone is represented as a whole. Which among the following have highest level of abstraction?(a) Motherboard(b) Display(c) Camera(d) PhoneThis question was addressed to me by my school teacher while I was bunking the class.I'd like to ask this question from Abstraction in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» The correct choice is (d) PHONE |
|
| 93. |
If two classes combine some private data members and provides public member functions to access and manipulate those data members. Where is abstraction used?(a) Using private access specifier for data members(b) Using class concept with both data members and member functions(c) Using public member functions to access and manipulate the data members(d) Data is not sufficient to decide what is being usedThe question was posed to me during an internship interview.My question is based upon Abstraction in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct answer is (c) Using PUBLIC member functions to access and manipulate the data members |
|
| 94. |
In terms of stream and files ____________(a) Abstraction is called a stream and device is called a file(b) Abstraction is called a file and device is called a stream(c) Abstraction can be called both file and stream(d) Abstraction can’t be defined in terms of files and streamThis question was addressed to me by my school teacher while I was bunking the class.This key question is from Abstraction in division OOPs Concept & Features of Object Oriented Programming |
|
Answer» Right choice is (a) Abstraction is called a stream and device is called a file |
|
| 95. |
Which among the following is not a level of abstraction?(a) Logical level(b) Physical level(c) View level(d) External levelI had been asked this question during an interview.My question is based upon Abstraction topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» Correct answer is (d) External level |
|
| 96. |
Using higher degree of abstraction __________(a) May get unsafe(b) May reduce readability(c) Can be safer(d) Can increase vulnerabilityThe question was asked during an interview for a job.The origin of the question is Abstraction topic in section OOPs Concept & Features of Object Oriented Programming |
|
Answer» RIGHT choice is (c) Can be SAFER Best explanation: It will make the code safer. One may think it reduces the READABILITY, but the fact is, it actually helps us UNDERSTAND the code better. We don’t have to read the complex code which is of no USE in understanding the program. |
|