0% found this document useful (0 votes)
50 views17 pages

OPPs

it wa sjustify that some of the well known address are te

Uploaded by

Azhir Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views17 pages

OPPs

it wa sjustify that some of the well known address are te

Uploaded by

Azhir Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

What is the additional feature in classes that was not in structures?

a.
Data members
b.
Member functions
c.
Static data allowed
d.
Public access specifier

Which Feature of OOP illustrated the code reusability?


a.
Polymorphism
b.
Abstraction
c.
Encapsulation
d.
Inheritance

Which of the two features match each other?


a.
Inheritance and Encapsulation
b.
Encapsulation and Polymorphism
c.
Encapsulation and Abstraction
d.
Abstraction and Polymorphism

Which class can have member functions without their implementation?


a.
Default class
b.
String class
c.
Template class
d.
Abstract class

Instance of which type of class can’t be created?


a.
Anonymous class
b.
Nested class
c.
Parent class
d.
Abstract class

___________ underlines the feature of Polymorphism in a class.


a.
Nested class
b.
Enclosing class
c.
Inline function
d.
Virtual Function

Which among doesn’t illustrates polymorphism?


a.
Function overloading
b.
Function overriding
c.
Operator overloading
d.
Virtual function

Which type of function among the following shows polymorphism?


a.
Inline function
b.
Virtual function
c.
Undefined functions
d.
Class member functions

.
Which among the following can show polymorphism?
a.
Overloading ||
b.
Overloading +=
c.
Overloading <<
d.
Overloading &&

Class is _________ abstraction


a.
Object
b.
Logical
c.
Real
d.
Hypothetical

Object is ________ abstraction


a.
Object
b.
Logical
c.
Real
d.
Hypothetical
Which of the following is a weak relationship between two objects?
Select correct option:
1. Inheritance
2. Composition
3. Aggregation
4. None of given

Which one of the following is not a valid reserved k

A.
A. explicit
B. public
C. implicit
D. private

. Which of the following feature is not supported by C+


exceptio
n
handlin
g
B. reflection
C. operator overloading
D. namespace

In object oriented Programming the program is


divided into ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐.

A. class
B. object
C. function
D. none of these

b) Dot operator
c) Arrow operator
d) Dot or arrow as
required
View Answer
Answer: d
28. Which feature
of OOP reduces
the use of nested
classes?
a) Inheritance
b) Binding
c) Abstraction
d) Encapsulation
View Answer
Answer: a
29. Which
keyword among
the following can
be used to declare
an array of
objects in java?
a) allocate
b) arr
c) new
d) create
View Answer
Answer: c
b) Dot operator
c) Arrow operator
d) Dot or arrow as
required
View Answer
Answer: d
28. Which feature
of OOP reduces
the use of nested
classes?
a) Inheritance
b) Binding
c) Abstraction
d) Encapsulation
View Answer
Answer: a
29. Which
keyword among
the following can
be used to declare
an array of
objects in java?
a) allocate
b) arr
c) new
d) create
View Answer
Answer: c
b) Dot operator
c) Arrow operator
d) Dot or arrow as
required
View Answer
Answer: d
28. Which feature
of OOP reduces
the use of nested
classes?
a) Inheritance
b) Binding
c) Abstraction
d) Encapsulation
View Answer
Answer: a
29. Which
keyword among
the following can
be used to declare
an array of
objects in java?
a) allocate
b) arr
c) new
d) create
View Answer
Answer: c
29. Which
keyword among
the following can
be used to declare
an array of
objects in java?
a) allocate
b) arr
c) new
d) create
View Answer
Answer: c
29. Which keyword among the following can be used to declare
an array of objects in java?
a) allocate
b) arr
c) new
d) create
……………………………………………………………………………………

What is friend
member functions
in C++?
a) Non-member
functions which
have access to all
the
members
(including private)
of a class
b) Member
function which
doesn’t have
access to private
members
c) Member
function which
can modify any
data of a class
d) Member
function which
can access all the
members of a
class
View Answer
Answer: a
What is friend
member functions
in C++?
a) Non-member
functions which
have access to all
the
members
(including private)
of a class
b) Member
function which
doesn’t have
access to private
members
c) Member
function which
can modify any
data of a class
d) Member
function which
can access all the
members of a
class
View Answer
Answer: a
What is friend member functions in C++?
a) Non-member functions which have access to all the
members (including private) of a class
b) Member function which doesn’t have access to private
members
c) Member function which can modify any data of a class
d) Member function which can access all the members of a
class
………………………………………………………………………………….

How to access the


private member
function of a
class?
a) Using class
address
b) Using object of
class
c) Using object
pointer
How to access the
private member
function of a
class?
a) Using class
address
b) Using object of
class
c) Using object
pointer
How to access the private member function of a class?
a) Using class address
b) Using object of class
c) Using object pointer
d) Using address of member function
…………………………………………………………………………………

Instance of which
type of class can’t
be created?
a) Parent class
b) Abstract class
c) Anonymous
class
d) Nested class
Instance of which type of class can’t be created?
a) Parent class
b) Abstract class
c) Anonymous class
d) Nested class
……………………………………………………………………………….
When a base class is privately inherited by derived class public members of the base class can
only be accessed by the ……… of the derived class.
A) non-member functions
B) friend functions
C) member functions
D) class members

…………………………………………………………………………………………..
16. In ……………………. inheritance, the constructors are executed in the order of
inheritance.
A) multipath
B) multiple
C) multilevel
D) hierarchical

……………………………………………………………………………………………..
17.The member functions of a derived class can directly access only the ……………….. data.
A) private and protected
B) private and public
C) protected and public
D) private, protected and public

18.The friend functions and the member functions of a friend class can directly access the
………………. data.
A) private and protected
B) private and public
C) protected and public
D) private, protected and public

……………………………………………………………………………………….
In C++, ……………………. creates objects, even through it was not defined in the class.
A) default constructor
B) parameterized constructor
C) implicit constructor
D) copy constructor

……………………………………………………………………………………….
An ………………….. with a constructor or destructor cannot be used as a member or a union.
A) class
B) object
C) function
D) variable

You might also like