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.
2. A base class contains elements common to a group of
Parent classes
Derived classes
Sub classes
Variables
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
3. A class defined within another class is:
Nested class
Inheritance
Containership
Encapsulation
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
4. A Class is a user defined data-type which have data members and
Data function
Variable
Member function
Linear function
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
5. A copy constructor takes
No argument
One argument
Two arguments
Arbitrary no. of arguments
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
6. A dictionary is example of data
Object
Entity
Collection
Types
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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.
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
12. A pure virtual function is a virtual function that
Has no body
Returns nothing
Is used in base class
Both a and c
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
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
Answer & Solution
No Solution for this Answer..! Report or Discus this Question