Object Oriented Programming Mcqs

Our collections of Multiple choice questions and answers focuses on study of ” Object Oriented Programming ” in Data Structures. These questions are chosen from a collection of most authoritative and best reference books on Data Structures. Our aim is to prepare an individual for competitive exams like NTS | GAT | ECAT | Data Warehouse jobs | Data Mining | DB administration jobs Software House and Computer Programmer jobs | University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate knowledge on Object Oriented Programming comprehensively.

  1. Home
  2. »
  3. Computer Science Mcqs
  4. »
  5. Data Structures Mcqs
  6. »
  7. Object Oriented Programming Mcqs

What value does function mystery return when called with a value of 4?int mystery ( int number ){if ( number





A base class contains elements common to a group of

Parent classes

Derived classes

Sub classes


A Class is a user defined data-type which have data members and

Data function


Member function

Linear function

A friend function to a class, C cannot access

Private data members and member functions

Public data members and member functions

Protected data members and member functions

The data members of the derived class of C

A function call mechanism that passes arguments to a function by passing a copy of the values of the arguments is __________

Call by name

Call by value

Call by reference

Call by value result

A library function exit() causes an exit from

The loop in which it occurs

The block in which it occurs

The function in which it occurs

The program in which it occurs

A pointer to the base class can hold address of

Only base class object

Only derived class object

base class object as well as derived class object

None of the above

A property which is not true for classes is that they

Are removed from memory when not in use.

Permit data to be hidden from other classes.

Bring together all aspects of an entity in one place.

Can closely model objects in the real world.

A pure virtual function is a virtual function that

Has no body

Returns nothing

Is used in base class

Both a and c

A static data member is given a value

Within the class definition

Outside the class definition

When the program is executed


A static function

Should be called when an object is destroyed

Is closely connected with and individual object of a class

Can be called using the class name and function name

Is used when a dummy object must be created

A struct is the same as a class except that

There are no member functions

All members are public

Cannot be used in inheritance hierarchy

It does have a this pointer

error: You are not allowed to do so.....
Scroll to Top