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

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

0

1

4

24

2.
A base class contains elements common to a group of

Parent classes

Derived classes

Sub classes

Variables

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

Data function

Variable

Member function

Linear function

7.
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

8.
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

9.
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

10.
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

11.
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.

12.
A pure virtual function is a virtual function that

Has no body

Returns nothing

Is used in base class

Both a and c

13.
A static data member is given a value

Within the class definition

Outside the class definition

When the program is executed

Never

14.
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

15.
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.....
0Shares
0
Scroll to Top