OOPs concept MCQ Quiz in मल्याळम - Objective Question with Answer for OOPs concept - സൗജന്യ PDF ഡൗൺലോഡ് ചെയ്യുക

Last updated on Mar 7, 2025

നേടുക OOPs concept ഉത്തരങ്ങളും വിശദമായ പരിഹാരങ്ങളുമുള്ള മൾട്ടിപ്പിൾ ചോയ്സ് ചോദ്യങ്ങൾ (MCQ ക്വിസ്). ഇവ സൗജന്യമായി ഡൗൺലോഡ് ചെയ്യുക OOPs concept MCQ ക്വിസ് പിഡിഎഫ്, ബാങ്കിംഗ്, എസ്എസ്‌സി, റെയിൽവേ, യുപിഎസ്‌സി, സ്റ്റേറ്റ് പിഎസ്‌സി തുടങ്ങിയ നിങ്ങളുടെ വരാനിരിക്കുന്ന പരീക്ഷകൾക്കായി തയ്യാറെടുക്കുക

Latest OOPs concept MCQ Objective Questions

Top OOPs concept MCQ Objective Questions

OOPs concept Question 1:

The mechanism by which the data and function are bound together with an object definition is:

  1. inheritance 
  2. Encapsulation
  3. Abstraction
  4. None of these 

Answer (Detailed Solution Below)

Option 2 : Encapsulation

OOPs concept Question 1 Detailed Solution

The correct option is (2)

Concept:-

The concept of encapsulation refers to the binding of data and functions to an object. Access to relevant class functions or methods is granted to data members. Members of the data can't access it from outside the class.Key Points

  • Data abstraction is a mechanism for exposing only the interfaces and hiding the implementation details from the user, while data encapsulation is a mechanism for packaging data and the functions that use it.
  • Encapsulation is described as the binding of data and the functions that manipulate it in object-oriented programming.
  • Encapsulation is a technique for combining data (variables) and the code that acts on the data (methods) into a single unit.

Additional InformationInheritence:- Inheritance refers to a class's capacity to derive features and traits from another class. One of the most significant characteristics of object-oriented programming is inheritance.

Abstraction:- Data abstraction is the process of hiding some details from the user and only displaying them what they need to know.

OOPs concept Question 2:

Which of the following is not a type of inheritance in C++? 

  1. Parallel Inheritance
  2. Single Level Inheritance
  3. Multilevel Inheritance
  4. Multiple Inheritance

Answer (Detailed Solution Below)

Option 1 : Parallel Inheritance

OOPs concept Question 2 Detailed Solution

The correct answer is "option 1".

CONCEPT:

Inheritance is a mechanism of acquiring the features & behaviors of parent class by child class.

The class that inherits the properties is called the derived class.

The class of which the derived class inherits the properties is called the base class.

EXPLANATION:

Option 1: 

Parallel Inheritance is not a type of inheritance in C++.

Option 2:

In Single inheritance, a single derived class can inherit properties of the single base class.

F1 Raju Madhu 26.05.21 D1

Option 3:

Multiple Inheritance is used to create more than one generation of classes.

F1 Raju Madhu 26.05.21 D2

Option 4:

In Multiple Inheritance, there can be more than one base class with one derived class.

F1 Raju Madhu 26.05.21 D3

Hence, the correct answer is "option1".

OOPs concept Question 3:

Which of the following is not true in case of public inheritance in C++?

  1. Each public member in the base class is public in the derived class
  2. Each protected member in the base class is protected in the derived class
  3. Each private member in the base class remains private in the base class
  4. Each private member in the base class remains public in the derived class

Answer (Detailed Solution Below)

Option 4 : Each private member in the base class remains public in the derived class

OOPs concept Question 3 Detailed Solution

Concept:

Inheritance means acquiring the properties of base class by the derived class. There are three accessing modes in inheritance: private, protected and public.

Explanation:

public inheritance:

In this, public members of base class remain public in the derived class and protected members of base class remains protected in base class.

private inheritance:

in this, each protected and public member of base class remains private in the derived class.

protected inheritance:

In this, each private and public member of base class remains protected in the derived class.

OOPs concept Question 4:

Use of virtual function implies_______

  1. Overloading
  2. Overriding
  3. Static binding
  4. Dynamic binding

Answer (Detailed Solution Below)

Option 4 : Dynamic binding

OOPs concept Question 4 Detailed Solution

Concept and Explanation:

Virtual function uses:

  • Virtual functions ensure that the correct function is called for an object, regardless of the type of reference used for function call.
  • Resolving of function call is done at runtime ( Dynamic binding )
  • Virtual function is used to achieve Run time polymorphism.
  • Function is declared with virtual keyword in base class.


So dynamic binding is the correct answer.

OOPs concept Question 5:

What is the character used in multiple inheritance?

  1. semi colon (;)
  2. comma (,)
  3. arrow (→)
  4. dollar ($)
  5. Astrisk (*)

Answer (Detailed Solution Below)

Option 2 : comma (,)

OOPs concept Question 5 Detailed Solution

  • Multiple Inheritance in C++ is one in which a class can inherit members from more than one class
  • A class who inherit the property is derived class and class from whom it is inherited is base class or parent class

 

Valid syntax of multiple inheritance in C++ is

class X: class A, class B { };

OOPs concept Question 6:

Which principle ensures that only essential information is visible to the outside world? 

  1. Polymorphism 
  2. Information hiding 
  3. Encapsulation 
  4. Abstraction 

Answer (Detailed Solution Below)

Option 2 : Information hiding 

OOPs concept Question 6 Detailed Solution

The correct answer is Information hiding

Key Points

  • Information Hiding:
    • Information hiding is a principle that focuses on restricting access to certain details or implementation details of a class or module and exposing only what is necessary for external use.
    • Information hiding ensures that the internal workings or details of a module or class are hidden from the external world, allowing only essential information to be visible. This helps in minimizing complexity and promoting a clear and stable interface.

 Additional Information

  • Polymorphism:
    • Polymorphism is a concept in object-oriented programming that allows objects of different types to be treated as objects of a common type. It enables a single interface to represent different types of objects.
  • Encapsulation:
    • Encapsulation is the bundling of data and the methods that operate on that data into a single unit (class). It involves restricting access to some of an object's components and preventing the direct modification of internal state.
  • Abstraction:
    • Abstraction involves simplifying complex systems by modeling classes based on essential properties and behaviors. It hides the complex reality while exposing only relevant features.

OOPs concept Question 7:

Which of the following methods can be used to stop method overriding?

  1. final
  2. static
  3. default
  4. None of the above

Answer (Detailed Solution Below)

Option 1 : final

OOPs concept Question 7 Detailed Solution

Method Overriding: It is a feature in the programming language that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes. It allows for a specific type of polymorphism (subtyping).

final: It is a non-access modifier that is applicable only for variables, methods and classes. Final variables are used to create constant variables, final methods are used to prevent method overriding and final classes are used to prevent inheritence.

static: It is a non-access modifier that is applicable for blocks, variables, methods and classes. Static methods can only call other static methods directly, they can access only static data directly and they cannot refer to this or super in any way.

default: This modifier is also referred to as no modifier. When no other modifier is in use then it is treated as default where it allows us to access within a class, within a subclass, and also non-sub class within a package. But there is a catch when the package differs, be it a subclass or non-class, we are not able to access it.

OOPs concept Question 8:

Runtime polymorphism is achieved by _____

  1. Friend function
  2. Virtual function
  3. Operator overloading
  4. Function overloading

Answer (Detailed Solution Below)

Option 2 : Virtual function

OOPs concept Question 8 Detailed Solution

Concept:

Friend function:

  • If a function is defined as a friend function then the private and protected data of a class can be accessed using the function.


Runtime polymorphism:

  • Runtime polymorphism is a process in which call to an overridden method is resolved at runtime rather than compile time.
  • Runtime polymorphism is achieved by virtual function.


Virtual function:

  • Virtual functions are mainly used to achieve runtime polymorphism.


Operator overloading:

  • Operator overloading enables the redefinition of operators.
  • Compile time polymorphism is achieved by operator overloading.


Function overloading:

  • Function overloading reduces the investment of different function names and used to perform similar functionality by more than one function.
  • Compile time polymorphism is achieved by operator overloading.


So option 2 is the correct answer.

OOPs concept Question 9:

Which of the following statement is/are incorrect with respect to abstract classes?

i. Subclasses of an abstract class that does not provide an implementation of an abstract method, are also abstract.

ii. Constructor and static methods cannot be declared in abstract class.

iii. Sometimes we can create objects directly.

iv. A method must always be redefined in a subclass of an abstract class.

  1. ii and iii
  2. i, ii and iv
  3. ii and iv
  4. i and ii

Answer (Detailed Solution Below)

Option 1 : ii and iii

OOPs concept Question 9 Detailed Solution

The correct answer is option 1.

Concept:

The abstract keyword is a non-access modifier for classes and methods:

  • An abstract class is a constrained class that cannot be utilized to generate objects (to access it, it must be inherited from another class).
  • The abstract method can only be used in an abstract class and does not have a body. The body is given by the subclass (inherited from).

Statement 1: Subclasses of an abstract class that does not provide an implementation of an abstract method, are also abstract.

True, When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class. However, if it does not, then the subclass must also be declared abstract.

Statement 2: Constructor and static methods cannot be declared in abstract class.

False, This statement is incorrect. Abstract classes can have constructors and static methods. In Java, for example, constructors in abstract classes are called when an instance of a concrete (i.e., not abstract) subclass is created.

Statement 3:Sometimes we can create objects directly.

False, We cannot create objects of an abstract class. To implement features of an abstract class, we inherit subclasses from it and create objects of the subclass. A subclass must override all abstract methods of an abstract class. However, if the subclass is declared abstract, it's not mandatory to override abstract methods.

Statement 4: A method must always be redefined in a subclass of an abstract class.

True, A method-defined abstract must always be redefined in the subclass, thus making overriding compulsory or making the subclass itself abstract. Any class that contains one or more abstract methods must also be declared with an abstract keyword. There can be no object of an abstract class.

Hence the correct answer is ii, and iii.

OOPs concept Question 10:

Which of the following high-level languages supports the concepts of class and objects?

  1. C
  2. COBOL
  3. FORTRAN
  4. C++

Answer (Detailed Solution Below)

Option 4 : C++

OOPs concept Question 10 Detailed Solution

"C++" language:

  • C++ is an object-oriented programming language. It comes under the category of ‘general-purpose programming language’ that is used for writing software in different variety of application domains.
  • C++ supports the concepts of class and objects.

 

"C" language:

  • C is a procedural programming language mainly developed as a system programming language to write an operating system.
  • The main features of C language include low-level access to memory and a simple set of keywords.
  • Many other languages have borrowed syntax/features directly or indirectly from C language.

 

COBOL:

  • COBOL stands for Common Business Oriented Language.
  • It was developed by the US Department of Defense as a language for business data processing needs.

 

FORTRAN:

● FORTRAN is a programming language that is used for numeric computation and scientific computing.

● It stands for FORmula TRANslation.

● It shortened the process of programming and made computer programming more accessible.

● It was developed by a team of programmers at IBM led by John Backus.

Get Free Access Now
Hot Links: teen patti plus rummy teen patti teen patti pro teen patti master 51 bonus teen patti customer care number