Practice
Resources
Contests
Online IDE
New
Free Mock
Events New Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
logo
Events
Attend free live masterclass hosted by top tech professionals
New
Scaler
Explore Offerings by SCALER

OOPs MCQ

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

Events | Powered By
Certificate included
About the Speaker
What will you Learn?
Register Now
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?

Excel at your interview with Masterclasses Know More
Certificate included
What will you Learn?
Your feedback is important to help us improve.
Free Mock Assessment
Fill up the details for personalised experience.
All fields are mandatory
Current Employer *
Enter company name *
Graduation Year *
Select an option *
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Graduation Year *
Graduation Year *
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
*Enter the expected year of graduation if you're student
Current Employer *
Company Name *
Please verify your phone number
Edit
Resend OTP
By clicking on Start Test, I agree to be contacted by Scaler in the future.
Already have an account? Log in
Free Mock Assessment
Instructions from Interviewbit
Start Test