Welcome to Interviewbit, help us create the best experience for you!

Currently, You are a:

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your career...

Current Company *
Enter company name
Experience *

You're all set!

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

OOPs MCQ

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

OOPS is Object-Oriented Programming.  It is an approach to developing software programming. It was introduced to overcome flaws in the procedural approach to programmings such as reusability and maintainability. Object-oriented programming or OOPS is a methodology of designing an application using classes and objects.

The fundamental idea behind object-oriented language is to combine into a single unit with both data and functions.

The data and functions that operate on that data such as a unit are called an object.

A class is a blueprint from which objects are created. A class describes the state or behavior of an object. A class can have attributes and methods:

  • Attributes: An Attribute is a public variable inside the class/object. For example, Length is an attribute of int data type. In other words, **class attributes** are the variable within a class.  You can access attributes by creating an object of a class and by using dot syntax(.).
  • Methods: A method is a group/block of code that takes input from the user, process it, and provides the output. The method runs only when it is called.

Object: 

An object is an instance of a class. It contains an address and takes up memory space. Objects have states and behavior defined as per their template definition.

Instance member variable: Attributes, data members, field, properties.

Instance member functions: Methods, procedures, actions, operations, services.

Features of OOPS

There are primarily four pillars of OOPS:

  • Data abstraction : 
    • Data hiding: It hides implementation details while just presenting the features to the outside world
    • Reduces code complexity
    • Hides details and exposes the essential parts.
  • Inheritance: Reusability
    • Mechanism of deriving a new class from an existing class.
    • Types:
      • Single level
      • Multi-level
      • Multiple
      • Hierarchical
      • Hybrid
  • Polymorphism: Object to take many forms
    • Types:
      • Compile-time polymorphism
      • Run time polymorphism
  • Encapsulation : 
    • Hiding the data for purpose of protection.
    • Writing data and functions into a single unit.

OOPs MCQs

1. 

What is the implicit return type of constructor?

2. 

When is the object created with a new keyword?

3. 

Identify the incorrect constructor type.

4. 

Identify the scope resolution operator.

5. 

Choose the option below which is not a member of the class.

6. 

Total types of constructors in C++ are?

7. 

What is the number of parameters that a default constructor requires?

8. 

Data members and member functions of a class are private. default. True or False?

9. 

Under which pillar of OOPS do base class and derived class relationships come?

10. 

Which of the following functions can be inherited from the base class?

11. 

Which of the following is not a type of inheritance?

12. 

What is an object in c++?

13. 

Why is reusability a desirable feature?

14. 

Identify the operators which cannot be overloaded.

15. 

Another name of overloading is?

16. 

By default, fields in a structure of a C program is?

17. 

On what basis is it determined, when a variable comes into existence in memory?

18. 

Identify the feature using which, one object can interact with another object.

19. 

Total access specifiers in OOPS for C++ are?

20. 

Choose the option below which can show polymorphism.

21. 

Select the following which shows the correct constructor.

22. 

To access data members of a class, which of the following is used?

23. 

Identify the feature, which is used to reduce the use of nested classes.

24. 

Choose the option below which is used to free the memory allocated for an object in C++.

25. 

Identify the option below which is not a property of the object.

26. 

What type of inheritance does single-level inheritance support?

27. 

In which of the following is memory allocated for the objects?

28. 

How do encapsulation and abstraction differ?

29. 

Choose the option below which is shown by function overriding

30. 

Choose the option below for which instance of the class cannot be created.

31. 

Identify the feature which can be implemented using encapsulation.

32. 

Why is a virtual function mainly used to achieve?

33. 

Virtual functions should be defined in?

34. 

Virtual function should be ________.

35. 

Choose whether True or False: The constructor function can be constant.

36. 

Dynamic memory allocation can be done using?

37. 

Total types of polymorphism in C++ are?

38. 

Another name of the generic class is?

39. 

Choose the option below which overloads using the friend function.

40. 

Choose whether True or False: Object cannot be passed as a function.

41. 

Identify the pure object-oriented programming language among the following.

42. 

Identify the abstract data type among the following.

43. 

What are the total catch blocks that can be used using a single Try block?

44. 

Choose the incorrect option below which is not a type of constructor.

45. 

Total instances of an abstract class that can be created?

46. 

Identify the option below which cannot be used with the term “virtual”.

47. 

Which type of inheritance is implemented in the following code below?

48. 

Choose the option below which is used to implement late binding.

49. 

What is cout?

50. 

Choose the option below which describes the overloading of functions.

51. 

Who developed object-oriented programming?

52. 

Which of the following is not an oops concept?

Get Placed at Top Product Companies with Scaler Know More 
Get Placed at Top Product Companies with Scaler
Sat transparent 640a34d454880bf68e3bfdf33f2389f2214043f59ad18b4c7f7b114e834fb257.svg

Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Personalised feedback report with solutions
Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Real life Interview Questions
Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Identify exact topics to improve

Your feedback is important to help us improve.
Free Mock Assessment
Help us know you better for the best experience
Current Employer *
Enter company name
College you graduated from *
Enter university name
Phone Number *
OTP will be sent to this number for verification
+91
+1
+247
+376
+971
+93
+1
+1
+355
+374
+244
+54
+1
+43
+61
+297
+358
+994
+387
+1
+880
+32
+226
+359
+973
+257
+229
+590
+1
+673
+591
+599
+55
+1
+975
+267
+375
+501
+1
+61
+243
+236
+242
+41
+225
+682
+56
+237
+86
+57
+506
+53
+238
+599
+61
+357
+420
+49
+253
+45
+1
+1
+213
+593
+372
+20
+212
+291
+34
+251
+358
+679
+500
+691
+298
+33
+241
+44
+1
+995
+594
+44
+233
+350
+299
+220
+224
+590
+240
+30
+502
+1
+245
+592
+852
+504
+385
+509
+36
+62
+353
+972
+44
+91
+246
+964
+98
+354
+39
+44
+1
+962
+81
+254
+996
+855
+686
+269
+1
+850
+82
+965
+1
+7
+856
+961
+1
+423
+94
+231
+266
+370
+352
+371
+218
+212
+377
+373
+382
+590
+261
+692
+389
+223
+95
+976
+853
+1
+596
+222
+1
+356
+230
+960
+265
+52
+60
+258
+264
+687
+227
+672
+234
+505
+31
+47
+977
+674
+683
+64
+968
+507
+51
+689
+675
+63
+92
+48
+508
+1
+970
+351
+680
+595
+974
+262
+40
+381
+7
+250
+966
+677
+248
+249
+46
+65
+290
+386
+47
+421
+232
+378
+221
+252
+597
+211
+239
+503
+1
+963
+268
+290
+1
+235
+228
+66
+992
+690
+670
+993
+216
+676
+90
+1
+688
+886
+255
+380
+256
+598
+998
+39
+1
+58
+1
+1
+84
+678
+681
+685
+383
+967
+262
+27
+260
+263
+979
Change Number
Edit
Resend OTP
By Continuing I agree to be contacted by Scaler in the future.