Object Oriented Programming OOP Mcqs
Here is the list of important Object Oriented Programming OOP Mcqs for the preparation of Computer IT posts in Fpsc, Kppsc, Ppsc, Etea, NTS and other government jobs exams. Here we cover all latest and past papers Object Oriented Programming OOP Mcqs which you want and prepare yourself for exams.
-Multiple Choice Questions:
Q. To convert from a user-defined class to a basic type, you would most likely use
(a) an overloaded = operator
(b) a one-argument constructor
(c) a built-in conversion operator
(d) a conversion operator that‘s a member of the class
Q. Inheritance is a way to
(a) pass arguments to objects of classes
(b) add features to existing classes without rewriting them
(c) improve data-hiding and encapsulation
(d) organize data
Q. A C++ class is similar to
(a) Library File
(b) Header File
(c) Structure
(d) None of these
Q. Which one of the following features of OOP is used to derive a class from another?
(a) Encapsulation
(b) Polymorphism
(c) Data hiding
(d) Inheritance
Q. What is a class?
(a) A class is the part of an object that contains the variables
(b) A class is a description of a kind of object
(c) A class is a section of the hard disk reserved for object oriented programs
(d) A class is a section of computer memory containing objects
Q. The main function of scope resolution operator (::) is,
(a) To define an object
(b) To define a data member
(c) To link the definition of an identifier to its declaration
(d) All of the given
Q. Which of the following operators always takes no argument if overloaded?
(a) ++
(b) /
(c) —
(d) +
Q. Assume a class C with objects obj1, obj2, and obj3. For the statement obj3 = obj1 – obj2 to work correctly, if the overloaded – operator must
(a) take two arguments
(b) take four arguments
(c) create a named temporary object
(d) return a value
Q. The keyword that is used that the variable can not change state?
(a) static
(b) friend
(c) private
(d) const
Q. Suppose obj1 and obj2 are two objects of a user defined class A. An + operator is overloaded to add obj1 and obj2 using the function call obj1+obj2. Identify the correct function prototype against the given call?
(a) A operator(A &obj3);
(b) int operator (plus) ();
(c) int + operator()
(d) A operator + ( A &obj);