CS304 Quiz 2 fall 2024

0

When we create objects, then space is allocated to:

Member functions

Access specifier

Data members

None of the given

 

If we extend our model, and the rest of model is not affected, then its called ___________

Consistency

Flexibility

Efficiency

Reusability

 

Using encapsulation we can achieve

Information hiding

Least interdependencies among modules

Implementation independence

All of given options

 

Consider the statement “room has chair” which of the following type of association exists between room and chair?

Inheritance

Composition

There is no association

Aggregation

 

A good model is ................ related to a real life problem.

Loosely

Openly

Closely

Not

 

If a class A inherits from class B, then class A is called.

Child Class

Derived class

Parent class

Child and derived class

 

Which one of the following is not a major element in an object model?

Abstraction

Encapsulation

Persistence

Hierarchy

 

Member functions defined inside a class declaration are ________ by default.

Visible

Public

Private

Changed

 

Advantage(s) of information hiding

Simplifies the model

Restriction to change

Both of above

None of the above

 

Which of the following parts of an object exhibits its state?

Data

Operations

Any public part

Any private part

 

Without using Deep copy constructor. A___________ problem can occur

System crash

Memory

Leakage

Dangling printer

All the given

 

Three main characteristics of "Object Oriented programming" are, 

Encapsulation, dynamic binding, polymorphism

Polymorphism, overloading, overriding

Encapsulation, inheritance, dynamic , binding

Encapsulation, inheritance, polymorphism

 

Overriding concept is used in”

Encapsulation

Polymorphism

Information hiding

None of the given

 

Main advantage of inheritance is:

Better understanding

Les understating

Reuse

Less complexity

 

Which one is a class association

Simple association

Inheritance

Composition

Aggregation

 

Public member function exposed by a class is called surface

True

False

 

Constructor and destructor can be declared constant

True

False

 

Which can allocate dynamic memory allocation through______ keyword.

Static

Global

New

Const

 

In inheritance, a child class is sub-type of base class.

True

False

 

If only one behaviour of a derived class is incompatible with base class, then it is:

Generalization

Specification

Extension

Inheritance

 

“A fan has wings”. Which type of relation exists between fan and wings in the sentence?

Aggregation

Association

Generalization

Composition

 

 

 

When an object initialize _________ automatically call by the complier

Constructor

Function

Object

None of the given

 

A class __________ destructor.

No

One

Two

Three

 

Suppose there is an object of type person, which of the following can be considered as one of its attributes

Name

Age

Work ()

Both name and Age

 

If MyClass has destructor named?

MyClass

~MyClass

My~Class

MyClass~

 

An abstract class shows _______ behaviour.

Overriding

Specific

General

None of the given

 

The _________ keyword tells the compiler to substitute the code within the function definition for every instance of a function call.

Virtual

Inline

Instance

None of the given

 

 

 

 

 

 

 

 

 

We can choose any arbitrary name for a constructor. 
Select correct option: 
True

False

 

Which one is not the main feature of object oriented programming? 
Select correct option: 
Classes and Objects 
Exception handling 
Inheritance 
Polymorphism 

The dot operator (or class member access operator) connects the following two entities (reading from left to right): 
Select correct option: 
A class member and a class object 
A class object and a class 
A class and a member of that class 
A class object and a member of that class 

If only one behaviour of a derived class is incompatible with base class, then it is: 
Select correct option: 
Generalization 
Specialization 
Extension 
Inheritance 


Storing data and functions in a single unit (class). Data cannot be accessible to the outside world and only those functions which are stored in the class can access it 
Select correct option: 
Inheritance 
Abstraction 
Polymorphism 
Encapsulation 


If MyClass has a destructor what is the destructor named? 
Select correct option: 
MyClass
~MyClass
My~Class
MyClass~

A real world object can be transformed into programming entity by defining its respective 
Select correct option: 
Class 
Function 
Only states 
Only behaviour 

Which of the following features of OOP is used to deal with only relevant details? 
Select correct option: 
Abstraction 
Information hiding 
Object 
Inheritance 

In class, attributes and behaviour is represented by: 
Select correct option: 
Member functions, data members 
Member functions, scope of data members 
Data members, member functions 
None of the given 


Using encapsulation we can achieve 
Select correct option: 
Information hiding 
Least interdependencies among modules 
Implementation independence 
All of given options 

Information hiding can be achieved through__________.

Encapsulation, Inheritance

Encapsulation, Polymorphism

Encapsulation, Abstraction

Overloading

 

A good model is ................ related to a real life problem.

Select correct option:

Loosely

Openly

Closely

 

 

 

 

 

Which of the following features of OOP is used to derive a class from another?

Select correct option:

Encapsulation

Polymorphism

Data hiding

Inheritance

 

Which of the following is a weak relationship between two objects?

Select correct option:

Inheritance

Composition

Aggregation

None of given

 

Data items in a class must be private.

Select correct option:

True

False

 

Which one is a class association?

Select correct option:

Simple Association

Inheritance

Composition

Aggregation

 

Suppose there is an object of type Person, which of the following can be considered as one of its attributes

Select correct option:

Name

Age

Work()

Both Name and Age

Question # 8 of 10 ( Start time: 01:17:52 AM ) Total M a r k s: 1

Which one is not an object association?

Select correct option:

Simple association

Inheritance

Aggregation

Association

 

Using encapsulation we can achieve

Select correct option:

Information hiding

Least interdependencies among modules

Implementation independence

All of given options

 

In constant member function the type of this pointer is:

Select correct option:

Constant pointer

Constant pointer to object

Constant pointer to class

Constant pointer to constant object

 

Which of the following is the way to extract common behavior and attributes from the given classes and make a separate class of those common behaviors and attributes?

Generalization

Sub-typing

Specialization

Extension

 

The ability to derive a class from more than one class is called

Single inheritance

Encapsulation

Multiple inheritance

Polymorphism

 

If MyClass has a destructor what is the destructor named?

MyClass

~MyClass

My~Class

MyClass~

 

Class abc{ ----- }; Is a valid class declaration?

yes

no

 

Without using Deep copy constructor, A ____________ problem can occur

System crash

Memory Leakage

Dangling pointer

All of the given

If only one behaviour of a derived class is incompatible with base class, then it is:

Generalization

Specialization

Extension

Inheritance

 

Which of the following may not be an integral part of an object?

state

behavior

Protected data members

All of given

 

Only tangible things can be chosen as an object.

True

False

Class is not a mechanism to create objects and define user data types.

true

false


Memory is allocated to non static members only, when:

Class is created

Object is defined

Object is initialized

Object is created


The sub-object’s life is not dependent on the life of master class in ___________.

Composition

Aggregation

Separation

non of the given


Unary operators and assignment operator are right associative.

true

false



The >= operator can't be overloaded.

true

false


_____ is creating objects of one class inside another class.

Association

Composition

Aggregation

Inheritance


If we are create array of objects through new operator, then

We can call overloaded constructor through new

We can’t call overloaded constructor through new

We can call default constructor through new

None of the given


Object can be declared constant with the use of Constant keyword.

true

false

 

__________ Operator will take only one operand.

New

int

object

none of the given


Which of the following operator(s) take(s) one or no argument if overloaded?

++

*

%

All of the given choices


this pointer does not pass implicitly to __________ functions.

Static Member

Non-Static Member

Instance Number

None of the given



Operator overloading is

making C++ operators work with objects.

giving C++ operators more than they can handle.

giving new meanings to existing Class members.

making new C++ operators

 

Which of the following is TRUE,

Derived class pointer can be used as Base class pointer

Base class pointer can be used as Derived class pointer

Both of these options

None of these options

 

___________ Binding means that target function for a call is selected at run time

Automatic

Dynamic

Static

Dramatic

 

When we want to implement one class in terms of another class then we use

Public inheritance

Protected inheritance

Private inheritance

None of these options

 

Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c2 is

Direct base class of c3

Direct child class of c3

Direct base class of c1

None of these

 

 

Consider the code below, class class1{ private: int i; }; class class2 : public class1 { }; Then int member i of class1 is ______ in class2,

Public

Protected

Private

None of the given options

 

A parent class can call constructor of its child class through

Its constructor initialization list

Its constructor body

Both from its constructor initialization list or body

Can not call the constructor of its child class

 

In Private Inheritance the public members of base class become __________ in derived class.

Public

Private

Protected

None of the given options

 

Function overriding is done in context of,

Single class

Single derived class

Single base class

Derived and base classes

 

Child class can call constructor of its,

Direct base class

Indirect base class

Both direct and indirect base classes

None of these

 

Adding a derived class to a base class requires fundamental changes to the base class

True

False

 

_______________ is automatically called when the object is created.

Member function

Object

Constructor

None of the given

 

Inheritance is a way to

Organize data

Pass arguments to objects of classes

Add features to existing classes without rewriting them

Improved data-hiding and encapsulation

 

Through interface we access object_____________.

States

Data members

Behaviour

None of the given

 

 

Which of the following may not be integral part of an object?

State

Behavior

Protected data members

All of given

 

Suppose there is an object of type Person, which of the following can be considered as on of its attributes.

Name

Age

Work()

Both Name and Age

 

 

If we have an overloaded constrictor in our class, then compiler construct the default constructor.

True

False

 

Advantages(s) of information hiding

Simplifies the model

Restriction to change

Both of above

None of the above

 

If some of objects exhibit identical characteristics, then they belong to:

Different classes

Multiple classes

Same class

None of the given

 

Which of the following is the way to extract common behaviour and attributes from the given and make a separate class of those common behaviours and attributes?

Generalization

Sub-typing

Specification

Extension

 

 

A class has ________ destructor

One

Two

Three

 

Bahaviors of a type of objects are represented through

States

Attributes

Operations

 

Which is not an example of multiple inheritances?

Mermaid

Amphibious Vehicle

Car

None of the above

 

Static data members are called ____________ variable

Class

Object

Structure

None of the given

 

Associatively can be change in operator overloading.

True

False

 

 

________ and ______ methods may not be declared abstract.

Private,static

private,public

static,public

none of the given

 

 

Let Suppose a class Student with objects std1, std2, and std3. For the statement std3 =

std1 - std2 to work correctly, if the overloaded - operator must

take two arguments.

None of the given choices

take single argument

take three arguments

 

To initialize an array of objects, only _____________ will be called

Default Constructor

Overloaded Constructor

Default Object

None of the above

 

__________ provide the facility to access the data member.

accesser function

private function

inline function

None of the given

 

 

 

If a class involves dynamic memory allocation, then:

Default copy constructor, shallow copy is implemented

User defined copy constructor, shallow copy is implemented

Default copy constructor, deep copy is implemented

User defined copy constructor, deep copy is implemented

 

The sentence “Object Oriented Programming book in bookshelf” is an example of:

Association

Multiple associations

Aggregation

 

 

How the information hidden within an object can be accessed?

Through its interface

Through its private data member

Through its private member functions

 

 

There is no need to is or is a kind of relationship in generalization

True

False

 

An object has _______ interface(s)

Only one

Only two

One or more than one

 

Which of the following is an advantage of OOP?

It provides an ability to create one user defined data type extending the other

It provides the facility of defining abstract data type through which real entities can be defined better

All of the given option

 

Encapsulation means 
Select correct option: 

Extending the behaviour of class in another class
Data and behaviour are tightly coupled within an entity
One entity takes all the attributes and operations of the other
Taking out the common features and put those in a separate class

We can allocate dynamic memory allocation through___________ key word. 
Select correct option: 
Static
Global
New
Const

In programming, where the actual actions are coded is called: 
Select correct option: 

Function declaration
Function calling
Function definition
None of the given

Which of the following is directly related to polymorphism? 
Select correct option: 
Overriding
Const members
Static members
None of given

 

In a class declaration, data or functions designated private are accessible 
Select correct option: 
to any function in the program. 
only if you know the password. 
to member functions of that class. 
only to public members of the class. 

An instance of user defined type is called 
Select correct option: 

Object
Class
both of above
none of above

Aggregation is implemented using pointer. 
Select correct option: 
True
False

 

 

If class A supports all the operations of class B, then class A is:

Class A is behaviourally compatible with class B

Class A is behaviourally incompatible with class B

Class A is independent of class B

None of the given

 

 

 

Objects having identical characteristics belong to ______________

Same class

Two different classes

Any number of different classes

Objects can not have identical characteristics

 

 When we create objects, then space is allocated to:

Member functions

Access specifier

Data members

None of the given

 

If we extend our model, and the rest of model is not affected, then its called ___________

Consistency

Flexibility

Efficiency

Reusability

 

Using encapsulation we can achieve

Information hiding

Least interdependencies among modules

Implementation independence

All of given options

 

Consider the statement “room has chair” which of the following type of association exists between room and chair?

Inheritance

Composition

There is no association

Aggregation

 

A good model is ................ related to a real life problem.

Loosely

Openly

Closely

Not

 

If a class A inherits from class B, then class A is called.

Child Class

Derived class

Parent class

Child and derived class

 

Which one of the following is not a major element in an object model?

Abstraction

Encapsulation

Persistence

Hierarchy

 

Member functions defined inside a class declaration are ________ by default.

Visible

Public

Private

Changed

 

Advantage(s) of information hiding

Simplifies the model

Restriction to change

Both of above

None of the above

 

Which of the following parts of an object exhibits its state?

Data

Operations

Any public part

Any private part

 

Without using Deep copy constructor. A___________ problem can occur

System crash

Memory

Leakage

Dangling printer

All the given

 

Three main characteristics of "Object Oriented programming" are, 

Encapsulation, dynamic binding, polymorphism

Polymorphism, overloading, overriding

Encapsulation, inheritance, dynamic , binding

Encapsulation, inheritance, polymorphism

 

Overriding concept is used in”

Encapsulation

Polymorphism

Information hiding

None of the given

 

Main advantage of inheritance is:

Better understanding

Les understating

Reuse

Less complexity

 

Which one is a class association

Simple association

Inheritance

Composition

Aggregation

 

Public member function exposed by a class is called surface

True

False

 

Constructor and destructor can be declared constant

True

False

 

Which can allocate dynamic memory allocation through______ keyword.

Static

Global

New

Const

 

In inheritance, a child class is sub-type of base class.

True

False

 

If only one behaviour of a derived class is incompatible with base class, then it is:

Generalization

Specification

Extension

Inheritance

 

“A fan has wings”. Which type of relation exists between fan and wings in the sentence?

Aggregation

Association

Generalization

Composition

 

 

 

When an object initialize _________ automatically call by the complier

Constructor

Function

Object

None of the given

 

A class __________ destructor.

No

One

Two

Three

 

Suppose there is an object of type person, which of the following can be considered as one of its attributes

Name

Age

Work ()

Both name and Age

 

If MyClass has destructor named?

MyClass

~MyClass

My~Class

MyClass~

 

An abstract class shows _______ behaviour.

Overriding

Specific

General

None of the given

 

The _________ keyword tells the compiler to substitute the code within the function definition for every instance of a function call.

Virtual

Inline

Instance

None of the given

 

 

 

 

 

 

 

 

 

We can choose any arbitrary name for a constructor. 
Select correct option: 
True

False

 

Which one is not the main feature of object oriented programming? 
Select correct option: 
Classes and Objects 
Exception handling 
Inheritance 
Polymorphism 

The dot operator (or class member access operator) connects the following two entities (reading from left to right): 
Select correct option: 
A class member and a class object 
A class object and a class 
A class and a member of that class 
A class object and a member of that class 

If only one behaviour of a derived class is incompatible with base class, then it is: 
Select correct option: 
Generalization 
Specialization 
Extension 
Inheritance 


Storing data and functions in a single unit (class). Data cannot be accessible to the outside world and only those functions which are stored in the class can access it 
Select correct option: 
Inheritance 
Abstraction 
Polymorphism 
Encapsulation 


If MyClass has a destructor what is the destructor named? 
Select correct option: 
MyClass
~MyClass
My~Class
MyClass~

A real world object can be transformed into programming entity by defining its respective 
Select correct option: 
Class 
Function 
Only states 
Only behaviour 

Which of the following features of OOP is used to deal with only relevant details? 
Select correct option: 
Abstraction 
Information hiding 
Object 
Inheritance 

In class, attributes and behaviour is represented by: 
Select correct option: 
Member functions, data members 
Member functions, scope of data members 
Data members, member functions 
None of the given 


Using encapsulation we can achieve 
Select correct option: 
Information hiding 
Least interdependencies among modules 
Implementation independence 
All of given options 

Information hiding can be achieved through__________.

Encapsulation, Inheritance

Encapsulation, Polymorphism

Encapsulation, Abstraction

Overloading

 

A good model is ................ related to a real life problem.

Select correct option:

Loosely

Openly

Closely

 

 

 

 

 

Which of the following features of OOP is used to derive a class from another?

Select correct option:

Encapsulation

Polymorphism

Data hiding

Inheritance

 

Which of the following is a weak relationship between two objects?

Select correct option:

Inheritance

Composition

Aggregation

None of given

 

Data items in a class must be private.

Select correct option:

True

False

 

Which one is a class association?

Select correct option:

Simple Association

Inheritance

Composition

Aggregation

 

Suppose there is an object of type Person, which of the following can be considered as one of its attributes

Select correct option:

Name

Age

Work()

Both Name and Age

Question # 8 of 10 ( Start time: 01:17:52 AM ) Total M a r k s: 1

Which one is not an object association?

Select correct option:

Simple association

Inheritance

Aggregation

Association

 

Using encapsulation we can achieve

Select correct option:

Information hiding

Least interdependencies among modules

Implementation independence

All of given options

 

In constant member function the type of this pointer is:

Select correct option:

Constant pointer

Constant pointer to object

Constant pointer to class

Constant pointer to constant object

 

Which of the following is the way to extract common behavior and attributes from the given classes and make a separate class of those common behaviors and attributes?

Generalization

Sub-typing

Specialization

Extension

 

The ability to derive a class from more than one class is called

Single inheritance

Encapsulation

Multiple inheritance

Polymorphism

 

If MyClass has a destructor what is the destructor named?

MyClass

~MyClass

My~Class

MyClass~

 

Class abc{ ----- }; Is a valid class declaration?

yes

no

 

Without using Deep copy constructor, A ____________ problem can occur

System crash

Memory Leakage

Dangling pointer

All of the given

If only one behaviour of a derived class is incompatible with base class, then it is:

Generalization

Specialization

Extension

Inheritance

 

Which of the following may not be an integral part of an object?

state

behavior

Protected data members

All of given

 

Only tangible things can be chosen as an object.

True

False

Class is not a mechanism to create objects and define user data types.

true

false


Memory is allocated to non static members only, when:

Class is created

Object is defined

Object is initialized

Object is created


The sub-object’s life is not dependent on the life of master class in ___________.

Composition

Aggregation

Separation

non of the given


Unary operators and assignment operator are right associative.

true

false



The >= operator can't be overloaded.

true

false


_____ is creating objects of one class inside another class.

Association

Composition

Aggregation

Inheritance


If we are create array of objects through new operator, then

We can call overloaded constructor through new

We can’t call overloaded constructor through new

We can call default constructor through new

None of the given


Object can be declared constant with the use of Constant keyword.

true

false

 

__________ Operator will take only one operand.

New

int

object

none of the given


Which of the following operator(s) take(s) one or no argument if overloaded?

++

*

%

All of the given choices


this pointer does not pass implicitly to __________ functions.

Static Member

Non-Static Member

Instance Number

None of the given



Operator overloading is

making C++ operators work with objects.

giving C++ operators more than they can handle.

giving new meanings to existing Class members.

making new C++ operators

 

Which of the following is TRUE,

Derived class pointer can be used as Base class pointer

Base class pointer can be used as Derived class pointer

Both of these options

None of these options

 

___________ Binding means that target function for a call is selected at run time

Automatic

Dynamic

Static

Dramatic

 

When we want to implement one class in terms of another class then we use

Public inheritance

Protected inheritance

Private inheritance

None of these options

 

Consider the code below, class c1{ }; class c2 : public c1 { }; class c3 : public c2 { }; Then c2 is

Direct base class of c3

Direct child class of c3

Direct base class of c1

None of these

 

 

Consider the code below, class class1{ private: int i; }; class class2 : public class1 { }; Then int member i of class1 is ______ in class2,

Public

Protected

Private

None of the given options

 

A parent class can call constructor of its child class through

Its constructor initialization list

Its constructor body

Both from its constructor initialization list or body

Can not call the constructor of its child class

 

In Private Inheritance the public members of base class become __________ in derived class.

Public

Private

Protected

None of the given options

 

Function overriding is done in context of,

Single class

Single derived class

Single base class

Derived and base classes

 

Child class can call constructor of its,

Direct base class

Indirect base class

Both direct and indirect base classes

None of these

 

Adding a derived class to a base class requires fundamental changes to the base class

True

False

 

_______________ is automatically called when the object is created.

Member function

Object

Constructor

None of the given

 

Inheritance is a way to

Organize data

Pass arguments to objects of classes

Add features to existing classes without rewriting them

Improved data-hiding and encapsulation

 

Through interface we access object_____________.

States

Data members

Behaviour

None of the given

 

 

Which of the following may not be integral part of an object?

State

Behavior

Protected data members

All of given

 

Suppose there is an object of type Person, which of the following can be considered as on of its attributes.

Name

Age

Work()

Both Name and Age

 

 

If we have an overloaded constrictor in our class, then compiler construct the default constructor.

True

False

 

Advantages(s) of information hiding

Simplifies the model

Restriction to change

Both of above

None of the above

 

If some of objects exhibit identical characteristics, then they belong to:

Different classes

Multiple classes

Same class

None of the given

 

Which of the following is the way to extract common behaviour and attributes from the given and make a separate class of those common behaviours and attributes?

Generalization

Sub-typing

Specification

Extension

 

 

A class has ________ destructor

One

Two

Three

 

Bahaviors of a type of objects are represented through

States

Attributes

Operations

 

Which is not an example of multiple inheritances?

Mermaid

Amphibious Vehicle

Car

None of the above

 

Static data members are called ____________ variable

Class

Object

Structure

None of the given

 

Associatively can be change in operator overloading.

True

False

 

 

________ and ______ methods may not be declared abstract.

Private,static

private,public

static,public

none of the given

 

 

Let Suppose a class Student with objects std1, std2, and std3. For the statement std3 =

std1 - std2 to work correctly, if the overloaded - operator must

take two arguments.

None of the given choices

take single argument

take three arguments

 

To initialize an array of objects, only _____________ will be called

Default Constructor

Overloaded Constructor

Default Object

None of the above

 

__________ provide the facility to access the data member.

accesser function

private function

inline function

None of the given

 

 

 

If a class involves dynamic memory allocation, then:

Default copy constructor, shallow copy is implemented

User defined copy constructor, shallow copy is implemented

Default copy constructor, deep copy is implemented

User defined copy constructor, deep copy is implemented

 

The sentence “Object Oriented Programming book in bookshelf” is an example of:

Association

Multiple associations

Aggregation

 

 

How the information hidden within an object can be accessed?

Through its interface

Through its private data member

Through its private member functions

 

 

There is no need to is or is a kind of relationship in generalization

True

False

 

An object has _______ interface(s)

Only one

Only two

One or more than one

 

Which of the following is an advantage of OOP?

It provides an ability to create one user defined data type extending the other

It provides the facility of defining abstract data type through which real entities can be defined better

All of the given option

 

Encapsulation means 
Select correct option: 

Extending the behaviour of class in another class
Data and behaviour are tightly coupled within an entity
One entity takes all the attributes and operations of the other
Taking out the common features and put those in a separate class

We can allocate dynamic memory allocation through___________ key word. 
Select correct option: 
Static
Global
New
Const

In programming, where the actual actions are coded is called: 
Select correct option: 

Function declaration
Function calling
Function definition
None of the given

Which of the following is directly related to polymorphism? 
Select correct option: 
Overriding
Const members
Static members
None of given

 

In a class declaration, data or functions designated private are accessible 
Select correct option: 
to any function in the program. 
only if you know the password. 
to member functions of that class. 
only to public members of the class. 

An instance of user defined type is called 
Select correct option: 

Object
Class
both of above
none of above

Aggregation is implemented using pointer. 
Select correct option: 
True
False

 

 

If class A supports all the operations of class B, then class A is:

Class A is behaviourally compatible with class B

Class A is behaviourally incompatible with class B

Class A is independent of class B

None of the given

 

 

 

Objects having identical characteristics belong to ______________

Same class

Two different classes

Any number of different classes

Objects can not have identical characteristics

 

 

Consider the statement “room has chair” Which of the following types of association exist between room and chair?

  1. inheritance
  2. composition
  3. There is no association
  4. Aggregation

Consider the following code segment :

class test

{

int a;

int b;

int c;

  1. 5, 5, 5
  2. 5, junk value, 5
  3. junk value, 5, junk value
  4. junk value, 5,5

Member function defined inside a class declaration are ________ by default.

  1. Visible
  2. Public
  3. Private
  4. Protected

A post-fix unary operator is implemented in C++ using member function with:

  1. 1 dummy char argument
  2. 1 dummy int argument
  3. 1 dummy float argument
  4. None of the given option

Suppose person is a class, which of the following statement define object of class person ?

  1. Create person object;
  2. Define Object;
  3. Person person;
  4. Object person;

__________ is the reverse process of Generalization.

  1. Aggregation
  2. Inheritance
  3. Dependence
  4. Specialization

If you have three classes in a C++ program A, B and C where class A inherits from class B, then class_________contains all the character of class________

  1. B, A
  2. A, B
  3. A, C
  4. B, C

Which of the following is true about inline function?

  1. It is used by compliers to improve efficiency of the program
  2. Small size function that need to be called many times during program execution are decaled inline
  3. Inline function decrease the code execution time
  4. All of the given option

What is a class?

  1. A class is section of computer memory containing objects
  2. A class is a section of the hard disk reserved for object oriented programs
  3. A class is the part of an object that contains the variables.
  4. A class is a description of a kind of object

Composition is ________ relationship

  1. is a
  2. is kind a
  3. Has
  4. part-whole

_________ represents “ IS a “ relationship.

  1. Simple Association
  2. Inheritance
  3. Composition
  4. Aggregation

A class can have only ________ destructor.

  1. One
  2. Two
  3. Three
  4. Four

Student *ptr = new Student(“ALI”); is an example of _______

  1. Static memory allocation
  2. Dynamic memory allocation
  3. Destructor
  4. Constructor

Inheritance is shown by;

  1. Open head arrow
  2. Filled arrow
  3. Single Line
  4. Bi-directional

Compile generated default constructor is called ________ and user written default constructor is called

  1. Compiler-defined, Implicit
  2. Explicit, User-defined
  3. Explicit, Implicit
  4. Implicit, Explicit

Entities in OO model are represented by;

  1. Circle
  2. Square
  3. Lines
  4. Rectangle

Which of the following concept is more close to encapsulation

  1. Exception handling
  2. Inheritance
  3. Polymorphism
  4. information hiding

In________ a pointer or reference to an object is created inside a class

  1. aggregation
  2. Composition
  3. Separation
  4. None of the given

Polymorphism makes the system

  1. reusable
  2. flexible
  3. faster
  4. All of the given option

A child inherits characteristics from its__________

  1. Neighbor
  2. parent
  3. sibling
  4. itself

How can we identify classes from a given problem statement?

  1. By extracting Nouns from problem statement
  2. By extracting verbs from problem statement
  3. By extracting adjective from problem statement
  4. All of the given option

Aggregation between objective shows that__________

  1. Objects have strong relationship
  2. Objects have weak relationship
  3. Objects have no relationship
  4. Objective have hierarchical relationship

Choose the correct option

  1. constructors cannot be const
  2. Destructors cannot be const.
  3. Constructors and Destructors are used to modify the object to a well-defined state.
  4. All of the given options

Through interface access object’s__________

  1. States
  2. Data members
  3. Behavior
  4. Class

All objects of same class has_____________attributes.

  1. Different
  2. Equal
  3. Same
  4. None of the given option

In __________ base class can be replaced by the derived class.

  1. Aggregation
  2. Inheritance
  3. Dependency
  4. Extension

Which of the following can only be overloaded as member function of the class?

  1. Equality operator: ==
  2. Inequality operator: !=
  3. Function operator: ()
  4. Stream extraction operator: >>

Which of the following is an example of objects in school?

  1. Car, Chair
  2. Student, Teacher
  3. Teacher, Height
  4. Book, Pages

In OOP we can achieve reusability through?

  1. Inheritance
  2. Encapsulation
  3. Aggregation
  4. Association

Subtyping means that derived class is behaviorally _________ with the base class.

  1. Same
  2. Compatible
  3. Different
  4. Incompatible

Which of the following can be used as an alternative to static members?

  1. Local Variables
  2. Global Variables
  3. Constant Variable
  4. Array of objects

_________ operator is used to create objects at run time

  1. create
  2. new
  3. dynamic
  4. subscript

Identify the common attributes of the given scenario:

Circle has color, vertices, and radius

Triangle has color, vertices, and angle

  1. Color, Vertices
  2. vertices, Radius
  3. Color, Angle
  4. Vertices, Radius

Inheritance is shown by:

  1. Open head arrow
  2. Filled arrow
  3. Single Line
  4. Bi-directional

In expression c1*c2+c3-c4 which of the following will be executed in first order?

  1. c1*c2
  2. c2+c3
  3. c3-c4
  4. c1-c4

An object has attribute, operations, and__________

  1. Unique Identity
  2. Behavior
  3. Characteristics
  4. All of these

Suppose a class does not have any constructor. what will happen when an object of this class is created ?

  1. Compiler will generate syntax error
  2. Run time error will occur
  3. Compiler will call implicit default constructor
  4. None of the given options

Hiding the implementation details makes program:

  1. Easy to understand
  2. More complex
  3. Provide more features
  4. Logical

In object oriented programming, objects communicate with each other through________

  1. Message
  2. Data member
  3. Voice chat
  4. Ports

Which of the following operator(s) take(s) one or no argument if overloaded?

  1. ++
  2. *
  3. %
  4. All of the given option

What is meant by multiple inheritance?

  1. Deriving a base class from derived class
  2. Deriving a derived class from base class
  3. Deriving a derived class from more than one base class
  4. None of the given option

Through_________,objects communication which outer world.

  1. Encapsulation
  2. Interface
  3. Inheritance
  4. Polymorphism

Information hiding can be achieved through__________

  1. Encapsulation, Inheritance
  2. Encapsulation, Polymorphism
  3. Encapsulation, Abstraction
  4. Encapsulation, Overloading
  1. Consider the code below,
    class class1{
    public:
    int i;
    };
    class class2 : public class1 {
    };

    Then int member i of class1 is ________ in class2.

    1. public
    2. protected
    3. private
    4. None of the given
  2. In Protected Inheritance the public members of base class become ________ in derived class.

    1. Public
    2. Private
    3. Protected
    4. None of the given
  3. In which of the following OOP paradigm objects cannot exist independently?

    1. Polymorphism
    2. Inheritance
    3. Aggregation
    4. Composition
  4. Function overriding is done in context of,

    1. Single class
    2. Single derived class
    3. Single base class
    4. Derived and base class
  5. In polymorphism, messages can be interpreted in different ways depending upon the ________ class.

    1. base
    2. derived
    3. sender
    4. receiver
  6. Insertion operator is ________ associative.

    1. Right to Left
    2. Left to Right
    3. Left to Left
    4. Right to Right
  7. If class B inherits from class A then it contains all characteristics of ________.

    1. Class B
    2. Class A
    3. No inheritance
    4. None of the given
  8. What is meant by multiple inheritance?

    1. Deriving a base class from derived class
    2. Deriving a derived class from base class
    3. Deriving a derived class from more than one base class
    4. None of the given
  9. The other name of specialization is ________.

    1. Restriction
    2. Extension
    3. Dependency
    4. Subtyping
  10. In C++ by default access of classes is ________.

    1. Private
    2. Protected
    3. Public
    4. None of the given
  11. Suppose for a class String, assignment operator is overloaded with following declaration.
    void operator =(const String &);
    What will happen when we will write following statement in main()?
    str1 = str2 = str3;
    Where, str1, str2 and str3 are objects of class String.

    1. Program will compile successfully.
    2. Compiler will generate compile time error.
    3. Run time error will be generated.
    4. None of the given
  12. Subtyping means that derived class is behaviorally ________ with the base class.

    1. Same
    2. Compatible
    3. Different
    4. Incompatible
  13. Suppose str1, str2 and str3 are objects of class String. Choose appropriate declaration of overloaded assignment operator for the following statement to work correctly.

    1. void operator =(const String &);
    2. String& operator =(const String &);
    3. String& overload =(const String &);
    4. void op =(const String &);
  14. In C++, Composition is a relationship between ________ and ________ objects.

    1. Parent, child
    2. Base, derived
    3. Whole, part
    4. All of the given
  15. Consider the code below,
    class class1{
    protected:
    int i;
    };
    class class2 : private class1 {
    };

    Then int member i of class1 is ________ in class2.

    1. public
    2. protected
    3. private
    4. None of the given
  16. Compiler generated copy constructor performs ________.

    1. Shallow copy
    2. Deep copy
    3. Both Shallow and Deep copy
    4. None of the given
  17. We can have ________ type of member functions in a class.

    1. Public
    2. Private
    3. Protected
    4. All of the given
  18. In C++ generic programming is done using ________.

    1. Procedures
    2. Packages
    3. Templates
    4. None of the given
  19. How many objects are involved in the N-ary association?

    1. More than 1
    2. More than 2
    3. More than 3
    4. More than 4
  20. Suppose there is an object of type Person, which of the following can be considered as one of its attributes?

    1. Name
    2. Eat
    3. Work
    4. Sleep
  21. Generalization is ________ approach.

    1. Bottom-up
    2. Top-bottom
    3. Right-Left
    4. Left-Right
  22. A good model is ________ related to a real life problem.

    1. Loosely
    2. Openly
    3. Closely
    4. Not
  23. When derived class has user defined assignment operator.

    1. Compiler itself calls base class assignment operator.
    2. Compiler itself calls base class copy constructor.
    3. Compiler itself calls base class default constructor.
    4. Compiler does nothing.
  24. What is the output of the following code?

    int main()
    {
    int const x = 10;
    cout << ++x;
    return 0;
    }

    1. 10
    2. 11
    3. Error
    4. None of the given
  25. Which of the following is True about class?

    1. It is a mechanism in C++ to realize objects in a program.
    2. It is concrete implementation of objects in C++
    3. It is used to create new types in C++ according to our requirement
    4. All of the given
  26. If you have three classes in a C++ program A, B, and C where class A inherits from class B, then class ________ contains all the characteristics of class ________.

    1. B, A
    2. A, B
    3. A, C
    4. B, C
  27. "Student registers Course and Teacher teaches the Course." is an example of:

    1. Binary Association
    2. Two way Association
    3. Ternary Association
    4. N-ary Association
  28. How can we differentiate between constructors and destructors?

    1. Destructors have a return type but Constructors do not have return type.
    2. Destructors can't be defined by the programmer, but Constructors can be defined by the programmer.
    3. Destructors are preceded with a tilde (~) symbol, and constructors are not preceded with any symbol.
    4. Destructors are exactly same as Constructors in syntax.
  29. Polymorphism makes the system:

    1. reusable
    2. flexible
    3. faster
    4. All of the given
  30. What is a class?

    1. A class is a section of computer memory containing objects
    2. A class is a section of the hard disk reserved for object oriented programs
    3. A class is the part of an object that contains the variables
    4. A class is a description of a kind of object
  31. Consider the statement "room has chair" Which of the following type of association exists between room and chair?

    1. Inheritance
    2. Composition
    3. There is no association
    4. Aggregation
  32. Consider the code below,

    class class1{
    private:
    void func1();
    };
    class class2 : private class1 {
    };
    Function func1 of class1 is ________ in class2.

    1. public
    2. protected
    3. private
    4. None of the given
  33. If there is a pointer p to objects of a base class , and it contains the address of an object of a derived class, and both classes contain a virtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the ________ class to be executed.

    1. base
    2. derived
    3. virtual
    4. implemented
  34. The ________ tells the compiler what task the function will be performing.

    1. Function declaration
    2. Function calling
    3. Function definition
    4. None of the given
  35. Which of the following is True about Destructor?

    1. It is used to free memory that is allocated through dynamic allocation.
    2. Free memory allocated using new operator by over self in destructor.
    3. It is used to perform house keeping operations.
    4. All of the given
  36. Class is blueprint of ________.

    1. Interface
    2. Class
    3. Objects
    4. Model
  37. ________ defines the order of evaluation of an operator in an expression.

    1. Operator Associativity
    2. Operator Precedence
    3. Arity of Operators
    4. None of the given
  38. Abstraction provides information according to ________.

    1. User perspective
    2. Owner perspective
    3. Random information
    4. All information
  39. ________ is represented by a line with an unfilled diamond head towards the container.

    1. Inheritance
    2. Association
    3. Aggregation
    4. Composition
  40. How the information hidden within an object can be accessed?

    1. Through its interface
    2. Through its private data members
    3. Through its private member functions
    4. Through both public and private members
  41. A pure virtual function is a virtual function that

    1. causes its class to be abstract.
    2. returns nothing.
    3. is used in a derived class.
    4. takes no arguments.
  42. Which of the following can be the attribute of an object "Ali"?

    1. Eat
    2. Walk
    3. Sleep
    4. Address
  43. Which of the following can be the behavior of an object "Usman"?

    1. Name
    2. Age
    3. Address
    4. Eat
  44. In case when we define the function outside the class then we must use the keyword ________ to make the function inline.

    1. requestin
    2. inlineout
    3. inline
    4. defineinline
  45. How many entities are there in the following scenario?
    Ali lives in the house that is near the tree and he also drives his car.

    1. 1
    2. 2
    3. 3
    4. 4
  46. ________ remain in memory even when all objects of a class have been destroyed.

    1. Static Variables
    2. Instance Variables
    3. Primitive Variables
    4. None of the given
  47. In case of public inheritance, protected members of base class will be ________ in derived class.

    1. private
    2. public
    3. Protected
    4. hidden
  48. A template argument is preceded by the keyword ________.

    1. vector
    2. class
    3. template
    4. type*
  49. In resolution order compiler search firstly ________.

    1. Generic Template
    2. Partial Specialization
    3. Complete Specialization
    4. Ordinary function
  50. The overloaded '-' operator for Complex class will be called with reference to ________ in the following statement
    Complex C3 = C1 - C2;

    1. Complex
    2. C1
    3. C2
    4. C3
  51. Consider the following code segment:

    class test
    {
    int a;
    int b;
    int c;
    public:
    test():b(5).c(a).a(b){}
    }

    What will the value of variables a, b, and c after instantiating an object of above class?

    1. 5, 5, 5
    2. 5, Junk value, 5
    3. Junk value, 5, Junk value
    4. Junk value, 5, 5
  52. Which of the following concept is more close to encapsulation?

    1. Exception Handling
    2. Inheritance
    3. Polymorphism
    4. Information Hiding
  53. ________ Binding means that target function for a call is selected at compile time.

    1. Static
    2. Dynamic
    3. Automatic
    4. None of the given
  54. In operator overloading, which of the following operator takes one or no argument.

    1. ++
    2. *
    3. %
    4. <<
  55. Which of the following is the correct syntax of declaring static variable "count" of type int?

    1. static count int;
    2. static int count;
    3. int static count;
    4. int count static;
  56. Which of the following types of Inheritance is used to model "Implemented in terms of" relationship?

    1. Public
    2. Private
    3. Protected
    4. Confidential
  57. Which of the following is a strong relationship?

    1. Inheritance
    2. Composition
    3. Association
    4. Polymorphism
  58. Suppose we have defined derived class copy constructor but have not defined base class copy constructor then compiler will,

    1. Use base class default constructor
    2. Generate base class copy constructor itself
    3. Use base class assignment operator
    4. None of the given
  59. Which of the following operators operate on one operand?

    1. Binary Operators
    2. Unary Operators
    3. Ternary Operator
    4. All of the given
  60. In ________, Base class can't always be replaced by the derived class.

    1. Aggregation
    2. Inheritance
    3. Specialization
    4. Extension
  61. How many objects of a given class may be constructed in an application?

    1. Only one per constructor.
    2. As many as the application asks for
    3. Only one per class
    4. One object per variable
  62. Methodologies to the development of reusable software relate to ________.

    1. Structure programming
    2. procedural programming
    3. generic programming
    4. None of the given
  63. In order to make any function constant, keyword const is placed at the ________ of the parameter list.

    1. Beginning
    2. Middle
    3. End
    4. None of the given
  64. A Child class can call constructor of its parent class through,

    1. Its constructor initialization list
    2. Its constructor body
    3. Both from its constructor initialization list or body
    4. Can not call the constructor of its parent class
  65. Which of the following is TRUE.

    1. Derived class pointer can be used as Base class pointer
    2. Base class pointer can be used as Derived class pointer
    3. Both of these options
    4. None of the given
  66. The default inheritance mode is,

    1. Public inheritance
    2. Protected inheritance
    3. Private inheritance
    4. None of the given
  67. Which of the following classes are used by Amphibious vehicle to inherit characteristics?

    1. Land Vehicle
    2. Water Vehicle
    3. Both Land & Water Vehicle
    4. None of the given
  68. A template provides a convenient way to make a family of

    1. variables and data members
    2. functions and classes
    3. classes and exceptions
    4. programs and algorithms
  69. Static Data Member is declared ________.

    1. Inside the class
    2. Outside the class
    3. Inside main() method
    4. None of the given
  70. In expression c1*c2+c3-c4 which of the following will be executed in first order?

    1. c1*c2
    2. c2+c3
    3. c3-c4
    4. c1-c4
  71. We can access a private static variable through:

    1. Static data member
    2. Static member function
    3. Global data member
    4. None of the given
  72. Static casting is,

    1. Implicit way of calling base class functions from derived class
    2. Explicit way of calling base class functions from derived class
    3. Both of the given
    4. None of the given
  73. Constructors have ________ return type.

    1. int
    2. char
    3. void
    4. no
  74. Defining a function in class body, the compiler treats that function as:

    1. User defined function
    2. Static function
    3. Recursive function
    4. Inline function
  75. Mermaid is an example of:

    1. Single inheritance
    2. Polymorphism
    3. Specialization
    4. Multiple Inheritance
  76. Assignment operators are:

    1. Left associative
    2. Right associative
    3. Left and right associative
    4. Non associative
  77. Choose correct declaration of overloaded stream insertion operator for class String as non-member friend function.

    1. friend ostream & operator << ();
    2. friend void & operator << (ostream & os);
    3. friend void operator << (const String & rhs);
    4. friend ostream & operator << (ostream & os, const String & s);
  78. In C++, which of the following keywords works only with constructors?

    1. const
    2. static
    3. explicit
    4. virtual
  79. In C++, which of the following operator can only be overloaded as a member function of the class?

    1. Equality Operator: ==
    2. Inequality Operator: !=
    3. Function Operator: ()
    4. Stream Extraction Operator: >>
  80. Identify the abstract class from the given statement:

    "Vehicle class is base class. Bus, Car, and Truck are derived classes"

    1. Vehicle
    2. Bus
    3. Car
    4. Truck
  81. Which of the following is NOT casting operator in C++ standard?

    1. static_cast
    2. var_cast
    3. dynamic_cast
    4. reinterpret_cast
  82. In case of protected inheritance, public members of base class will be ________ in derived class?

    1. private
    2. public
    3. protected
    4. hidden
  83. In case of private inheritance, private members of base class will be ________ in derived class.

    1. private
    2. public
    3. protected
    4. hidden
  84. Which of the following statements best describes the Constructor?

    1. Constructor is used to modify constant data members of the class.
    2. Constructor is used to delete the objects of a class.
    3. Constructor is used to initialize the data members of a class.
    4. All of the given
  85. The other name of specialization is ________.

    1. Restriction
    2. Extension
    3. Dependency
    4. Subtyping

  1. The overloaded '-' operator for Complex class will be called with reference to ________ in the following statement
    Complex C3 = C1 - C2;

    1. Complex
    2. C1
    3. C2
    4. C3
  2. What is a class?

    1. A class is a section of computer memory containing objects
    2. A class is a section of the hard disk reserved for object oriented programs
    3. A class is the part of an object that contains the variables
    4. A class is a description of a kind of object
  3. In polymorphism, messages can be interpreted in different ways depending upon the ________ class.

    1. base
    2. derived
    3. sender
    4. receiver
  4. Suppose there is an object of type Person, which of the following can be considered as one of its attributes?

    1. Name
    2. Eat
    3. Work
    4. Sleep
  5. Which of the following is True about class?

    1. It is a mechanism in C++ to realize objects in a program.
    2. It is concrete implementation of objects in C++
    3. It is used to create new types in C++ according to our requirement
    4. All of the given
  6. In C++, which of the following keywords works only with constructors?

    1. const
    2. static
    3. explicit
    4. virtual
  7. Choose correct declaration of overloaded stream insertion operator for class String as non-member friend function.

    1. friend ostream & operator << ();
    2. friend void & operator << (ostream & os);
    3. friend void operator << (const String & rhs);
    4. friend ostream & operator << (ostream & os, const String & s);
  8. Which of the following classes are used by Amphibious vehicle to inherit characteristics?

    1. Land Vehicle
    2. Water Vehicle
    3. Both Land & Water Vehicle
    4. None of the given
  9. Constructors have ________ return type.

    1. int
    2. char
    3. void
    4. no
  10. The other name of specialization is ________.

    1. Restriction
    2. Extension
    3. Dependency
    4. Subtyping
  11. ________ is represented by a line with an unfilled diamond head towards the container.

    1. Inheritance
    2. Association
    3. Aggregation
    4. Composition
  12. ________ remain in memory even when all objects of a class have been destroyed.

    1. Static Variables
    2. Instance Variables
    3. Primitive Variables
    4. None of the given
  13. Static Data Member is declared ________.

    1. Inside the class
    2. Outside the class
    3. Inside main() method
    4. None of the given
  14. A good model is ________ related to a real life problem.

    1. Loosely
    2. Openly
    3. Closely
    4. Not
  15. In which of the following OOP paradigm objects cannot exist independently?

    1. Polymorphism
    2. Inheritance
    3. Aggregation
    4. Composition
  16. In order to make any function constant, keyword const is placed at the ________ of the parameter list.

    1. Beginning
    2. Middle
    3. End
    4. None of the given
  17. "Student registers Course and Teacher teaches the Course." is an example of:

    1. Binary Association
    2. Two way Association
    3. Ternary Association
    4. N-ary Association
  18. Which of the following can be the attribute of an object "Ali"?

    1. Eat
    2. Walk
    3. Sleep
    4. Address
  19. Consider the statement "room has chair" Which of the following type of association exists between room and chair?

    1. Inheritance
    2. Composition
    3. There is no association
    4. Aggregation
  20. We can access a private static variable through:

    1. Static data member
    2. Static member function
    3. Global data member
    4. None of the given
  21. Abstraction provides information according to ________.

    1. User perspective
    2. Owner perspective
    3. Random information
    4. All information
  22. Which of the following concept is more close to encapsulation?

    1. Exception Handling
    2. Inheritance
    3. Polymorphism
    4. Information Hiding
  23. How the information hidden within an object can be accessed?

    1. Through its interface
    2. Through its private data members
    3. Through its private member functions
    4. Through both public and private members
  24. ________ defines the order of evaluation of an operator in an expression.

    1. Operator Associativity
    2. Operator Precedence
    3. Arity of Operators
    4. None of the given
  25. Which of the following is the correct syntax of declaring static variable "count" of type int?

    1. static count int;
    2. static int count;
    3. int static count;
    4. int count static;
  26. Defining a function in class body, the compiler treats that function as:

    1. User defined function
    2. Static function
    3. Recursive function
    4. Inline function
  27. What is the output of the following code?

    int main()
    {
    int const x = 10;
    cout << ++x;
    return 0;
    }

    1. 10
    2. 11
    3. Error
    4. None of the given
  28. Which of the following statements best describes the Constructor?

    1. Constructor is used to modify constant data members of the class.
    2. Constructor is used to delete the objects of a class.
    3. Constructor is used to initialize the data members of a class.
    4. All of the given
  29. Consider the following code segment:

    class test
    {
    int a;
    int b;
    int c;
    public:
    test():b(5).c(a).a(b){}
    }

    What will the value of variables a, b, and c after instantiating an object of above class?

    1. 5, 5, 5
    2. 5, Junk value, 5
    3. Junk value, 5, Junk value
    4. Junk value, 5, 5
  30. Which of the following is a strong relationship?

    1. Inheritance
    2. Composition
    3. Association
    4. Polymorphism
  31. How many objects of a given class may be constructed in an application?

    1. Only one per constructor.
    2. As many as the application asks for
    3. Only one per class
    4. One object per variable
  32. The other name of specialization is ________.

    1. Restriction
    2. Extension
    3. Dependency
    4. Subtyping
  33. How can we differentiate between constructors and destructors?

    1. Destructors have a return type but Constructors do not have return type.
    2. Destructors can't be defined by the programmer, but Constructors can be defined by the programmer.
    3. Destructors are preceded with a tilde (~) symbol, and constructors are not preceded with any symbol.
    4. Destructors are exactly same as Constructors in syntax.
  34. How many entities are there in the following scenario?
    Ali lives in the house that is near the tree and he also drives his car.

    1. 1
    2. 2
    3. 3
    4. 4
  35. Which of the following is True about Destructor?

    1. It is used to free memory that is allocated through dynamic allocation.
    2. Free memory allocated using new operator by over self in destructor.
    3. It is used to perform house keeping operations.
    4. All of the given
  36. How many objects are involved in the N-ary association?

    1. More than 1
    2. More than 2
    3. More than 3
    4. More than 4
  37. Which of the following can be the behavior of an object "Usman"?

    1. Name
    2. Age
    3. Address
    4. Eat
  38. In C++, Composition is a relationship between ________ and ________ objects.

    1. Parent, child
    2. Base, derived
    3. Whole, part
    4. All of the given
  39. If you have three classes in a C++ program A, B, and C where class A inherits from class B, then class ________ contains all the characteristics of class ________.

    1. B, A
    2. A, B
    3. A, C
    4. B, C
  40. In case when we define the function outside the class then we must use the keyword ________ to make the function inline.

    1. requestin
    2. inlineout
    3. inline
    4. defineinline
  41. Mermaid is an example of:

    1. Single inheritance
    2. Polymorphism
    3. Specialization
    4. Multiple Inheritance
  42. Assignment operators are:

    1. Left associative
    2. Right associative
    3. Left and right associative
    4. Non associative
  43. Generalization is ________ approach.

    1. Bottom-up
    2. Top-bottom
    3. Right-Left
    4. Left-Right
  44. The ________ tells the compiler what task the function will be performing.

    1. Function declaration
    2. Function calling
    3. Function definition
    4. None of the given
  45. Suppose str1, str2 and str3 are objects of class String. Choose appropriate declaration of overloaded assignment operator for the following statement to work correctly.

    1. void operator =(const String &);
    2. String& operator =(const String &);
    3. String& overload =(const String &);
    4. void op =(const String &);
  46. In operator overloading, which of the following operator takes one or no argument.

    1. ++
    2. *
    3. %
    4. <<
  47. Class is blueprint of ________.

    1. Interface
    2. Class
    3. Objects
    4. Model
  48. Polymorphism makes the system:

    1. reusable
    2. flexible
    3. faster
    4. All of the given
  49. If class B inherits from class A then it contains all characteristics of ________.

    1. Class B
    2. Class A
    3. No inheritance
    4. None of the given
  50. What is meant by multiple inheritance?

    1. Deriving a base class from derived class
    2. Deriving a derived class from base class
    3. Deriving a derived class from more than one base class
    4. None of the given
  51. In C++, which of the following operator can only be overloaded as a member function of the class?

    1. Equality Operator: ==
    2. Inequality Operator: !=
    3. Function Operator: ()
    4. Stream Extraction Operator: >>
  52. Insertion operator is ________ associative.

    1. Right to Left
    2. Left to Right
    3. Left to Left
    4. Right to Right
  53. In expression c1*c2+c3-c4 which of the following will be executed in first order?

    1. c1*c2
    2. c2+c3
    3. c3-c4
    4. c1-c4
  54. Suppose for a class String, assignment operator is overloaded with following declaration.
    void operator =(const String &);
    What will happen when we will write following statement in main()?
    str1 = str2 = str3;
    Where, str1, str2 and str3 are objects of class String.

    1. Program will compile successfully.
    2. Compiler will generate compile time error.
    3. Run time error will be generated.
    4. None of the given
  55. Identify the abstract class from the given statement:

    "Vehicle class is base class. Bus, Car, and Truck are derived classes"

    1. Vehicle
    2. Bus
    3. Car
    4. Truck
  56. Which of the following operators operate on one operand?

    1. Binary Operators
    2. Unary Operators
    3. Ternary Operator
    4. All of the given
  57. Subtyping means that derived class is behaviorally ________ with the base class.

    1. Same
    2. Compatible
    3. Different
    4. Incompatible
  58. In ________, Base class can't always be replaced by the derived class.

    1. Aggregation
    2. Inheritance
    3. Specialization
    4. Extension

What will be the value of variables a,b, and c after instantiating an object of the given class? class test {int a; int b; int c;public:test():b(5),c(a),a(b){}};

A. 5, 5, 5

B. 5, Junk value, 5

C. Junk value, 5, Junk value

D. Junk value, 5, 5

 

Student *ptr = new Student(“Ali”); is an example of                       .

A. Dynamic memory allocation                   ok

B. Destructor

C. Static memory allocation

D. Constructor

Constant data members of a class can be initialized by using

                                .

A. Non-constant Member Function

B. Class

C. Constant Member Function

D. Member Initializer List                     ok

 

Static Data Member of a class is declared                          .

A. Outside the class

B. Outside the main() method

C. Inside the class                   ok

D. Inside main() method

 

Which of the following can be created without any object of a class?

A. Static Data Members                    ok

B. Array of Objects

C. Non-Static Data Members

D. Instance Variables

 

 


What will be the value of variables a,b, and c after instantiating an object of the given class? class test {int a; int b; int c;public:test():b(5),c(a),a(b){}};

A. 5, 5, 5

B. 5, Junk value, 5

C. Junk value, 5, Junk value

D. Junk value, 5, 5

 

In operator overloading, which of the following operator takes one or no argument.

A. ++                 ok

B. %

C. *

D. <<

 

In OOP, static data members of a class are called                           variables.

A.     Structure

B.    Class                ok

C.     Object

D.     Function

 

Memory is allocated to non-static members only, when

                                .

A.     Program is compiled

B.     Object is destructed

C.     Class is created

D.    Object is created                   ok

Which of the following best describes relationship between House and Address classes?

A.    Association

 

 




B.     Inheritance

C.     Aggregation

D.   Composition

Which of the following best describes relationship between House and Address classes?

A.     Association

B.     Inheritance

C.    Aggregation

D.     Composition

 

                          means that different objects can behave in different ways for the same message.

A.     Generalization

B.     Specialization

C.    Polymorphism

D.     Abstraction

 

In order to make any function constant, keyword const is placed

                      the parameter list.

A.     after

B.     within

C.     between

D.    before

 

Which of the following is NOT true about Inline function?

A.     Inline function decreases the code execution time.

B.    Inline function does not substitute the code within the function definition on a function call.

C.     It is used by compilers to improve efficiency of the program.

D.     Small size functions that need to be called many times during program execution are declared inline.

 

 




                                 are best candidates to become objects in problem description.

A.     Verbs

B.     Adjectives

C.    
Adverb

D.    Nouns

Which of the following is not a pillar of Object Orientation Programming?

A.     Polymorphism

B.     Abstraction

C.     Encapsulation

D.    Normalization

Which of the following is an advantage of inheritance?

A.     Inconsistency

B.    Re-usability

C.     Redundancy

D.     Ambiguity

An object has                 interface(s).

A.    One or more than one

B.     No

C.    
Only one

D.     Only two

How the information hidden within an object can be accessed?

A.     Through its interface

B.    Through both public and private members              ok

C.     Through its private data members

D.     Through its private member functions

 

 

 

 




Suppose there is an object of type Person, which of the following can be considered as one of its attributes?

A.     Eat

B.     Work

C.    Name

D.     Sleep

Inheritance is the relationship between                         .

A.     Functions

B.    Classes              ok

C.     Messages

D.     Interfaces

Suppressed form of class representation contains                            .

A.     Interface Name

B.     Operations

C.     Class Name

D.    Attributes

 

Generalization is implemented through                           .

A.     Aggregation

B.    Inheritance

C.     Composition

D.     Polymorphism

 

Entities in Object Oriented model are represented by                          .

A.    Rectangle                 ok

B.     Circle

C.     Lines

D.     Square

 

                        couples data and behavior tightly inside the object.

 

 




A.     Abstraction

B.     Polymorphism

C.     Inheritance

D.    Encapsulation

 

Constructors have             return type.

A.    No                ok

B.     Char

C.     Void

D.     Int

 

Destructor is a function which has the same name as that of class, but starts with a                   sign.

A.     $

B.    ~             ok

C.     #

D.     %

 

Which of the following is NOT true about constructors?

A.     Constructors can use Initializer list for initializing the constant data members.

B.    Constructors can be const.

C.     Constructors are called automatically.

D.     Constructors are used to modify the object to a well-defined state. 100% Correct answer required.

                  is automatically called when the object is created.

A.     Data Member

B.     Member Function

C.    Constructor                    ok

D.     Object

 

 

 

 




A child inherits characteristics from                     .

A.     Sibling

B.     Neighbor

C.     Itself

D.    Parent              ok

 

                        is the relationship between the “part” object and the “whole” object.

A.     Association

B.     Inheritance

C.    Composition                 ok

D.     Polymorphism

Constructor is used to             the objects of a class.

A.     update

B.     delete

C.     create

D.    initialize

 

Which of the following is NOT True about Destructor?

A.     Used to perform house keeping operations

B.     Free memory allocated using new operator

C.     Used to free memory allocated through dynamic allocation

D.    Used to free memory allocated through static allocation

 

“A fan has wings”. Which type of relationship exists between fan and wings in this sentence?

A.     Association

B.     Generalization

C.     Aggregation

D.    Composition                    ok

 

 

 

 




The concept of derived classes is involved in                         .

A.     encapsulation

B.     abstraction

C.    inheritance

D.     aggregation

 

The functions defined inside the class are usually taken                                                                                                                         by compiler.

A.     Public

B.     Static

C.    Inline                  ok

D.     Constant

Which of the following statement best describes the Constructor?

A.    Constructor is used to initialize the data members of a class.        ok

B.     Constructor is used to delete the objects of a class.

C.     Constructor is used to create an object of a class.

D.     Constructor is used to modify constant data members of the class.

 

Compiler generated default constructor is called                             and user written default constructor is called                               .

A.    Implicit, Explicit                        ok

B.     Explicit, User-defined

C.     Compiler-defined, Implicit

D.     Explicit, Implicit

We can allocate dynamic memory in C++ through                      operator.

A.     Static

B.    New                 ok

C.     Const

D.     Global

 

 




Which of the following is a tangible entity?

A.     Database

B.     Time

C.    Car

D.     Date of birth

 

What is meant by multiple inheritance?

A.     Deriving a derived class from base class

B.    Deriving a derived class from more than one base class                ok

C.     None of the given option

D.     Deriving a base class from derived class

 

Through                    , Objects communicate with outer world.

A.     Polymorphism

B.     Encapsulation

C.    Interface                     ok

D.     None of these

 

Suppose Person is a class, which of the following statement declares an object of class Person?

A.     Object Person;

B.     Define Object;

C.     Create Person object;

D.    Person person;                 ok

 

                        is the reverse process of Generalization.

A.    Specialization                  ok

B.     Aggregation

C.     Inheritance

D.     Dependence

 

 

 



Suppose a class does not have any constructor. What will happen when an object of this class is created?

A.     Compiler will call default parameterized constructor.

B.    Compiler will call implicit default constructor.                  ok

C.     Compiler will generate syntax error.

D.     Run time error will occur.

How many objects can be created once a class is defined?

A.    As many as needed

B.     Two

C.     Four

D.     Three

“Object hides its information from others”, this concept is known as

                 .

A.     Polymorphism

B.    Information Hiding

C.     Specialization

D.     Inheritance

In OOP, which of the following feature is used to derive a class from another class?

A.    Inheritance                 ok

B.     Data hiding

C.     Polymorphism

D.     Encapsulation

 

Statement “Yasir is a friend of Ali and Ali is a friend of Yasir” is an example of                              .

A.     Ternary association

B.     N-ary association

C.    Two way association

 

 




D.     One way association

 

Which of the following can be the behavior of an object “Usman”?

A.     Name

B.    Eat                 ok

C.     Address

D.     Age

 

Class is blueprint of a/an                   .

A.     Interface

B.     Model

C.     Function

D.    Object

Which of the following statements defines destructor for class Student?

A.    ~Student() {//… }                    ok

B.     ~Destruct() {//… }

C.     ~Destructor() {//… }

D.     ~DestroyStudent() {//…}

Which of the following is an advantage of encapsulation?

A.     Increase Memory Usage

B.     Inefficient Code

C.     Complexity

D.    Information Hiding

Which of the following is NOT true about constructor?

A.    Constructor is a special function which can have different name than class name.

B.     Constructor is used to initialize data members of a class.

C.     Constructors are commonly public members of a class.

D.     Constructor does not have return type.

 

 




Abstraction hides the                     details.

A.     Irrelevant

B.     Public

C.    Relevant

D.     Private

                  is used for hiding the details of an object from the other parts of a program?

A.    Encapsulation

B.     Composition

C.     Inheritance

D.     Aggregation

Which of the following method allows to reuse the characteristics of more than one parent class?

A.     Polymorphism

B.     Single inheritance

C.     Specialization

D.    Multiple Inheritance                   ok

 

Which of the following is part of the class in UML diagram?

A.     Attributes

B.     Behaviors

C.     Class Name

D.    All of the given options             ok

 

Abstraction provides information according to                       .

A.     Random information

B.     All information

C.     Behavioural perspective

D.    User perspective

 

 



In class, attributes and behaviors are represented by                  and

              respectively.

A.     Access Specifiers, Friend Functions

B.     Member functions, Data members

C.     Member functions, Accessor Specifiers

D.    Data Members, Member Functions                  ok

 

Interface is a set of                        of an object exposed to other objects.

A.    Methods

B.     Classes

C.     Attributes

D.     Structures

Question No:1                              (Marks:1)                      Vu-Topper RM Which of the following best describes relationship between Book and BookChapter classes?

Which of the following best describes relationship between House and Address classes?

E.     Association

F.      Inheritance

G.    Aggregation

H.  Composition                       ok

 

Question No:2                               (Marks:1)                      Vu-Topper RM

The keyword "friend" should be placed in                          :

A.    Main Function

B.     Function Definition

C.     Anywhere in program

D.   Function Declaration              Google                     ok

 

Question No:3                               (Marks:1)                      Vu-Topper RM

 

 




Which of the following stores the address of a variable?

A.   Pointer                ok

B.     Function

C.     Destructor

D.    Constructor

 

Question No:4                               (Marks:1)                      Vu-Topper RM

            is creating objects of one class inside another class.

A.    Association

B.     Inheritance

C.     Aggregation

D.   Composition             Page 125                  ok

Question No:5                               (Marks:1)                      Vu-Topper RM

Which of the following can be used as an alternative to static members?

A.    Local Variables

B.     Array of Objects

C.   Global Variables                   ok

D.    Constant Variables

Question No:6                              (Marks:1)                      Vu-Topper RM What is the general syntax of overloading Unary Operator as member function of the class?

A.   TYPE & operator OP ();

B.     TYPE & operator OP (int);

C.     TYPE & operator OP (TYPE &);

D.    TYPE & operator OP (TYPE &, TYPE &);

 

Question No:7                               (Marks:1)                      Vu-Topper RM

Which of the following operators operate on one operand?

A.   Unary Operators

B.     Ternary Operator

 

 



C.     Binary Operators

D.    All of the given options

 

Question No:8                              (Marks:1)                      Vu-Topper RM Composition is                and aggregation is                             relationship.

A.    Weak, Weak

B.     Weak, Strong

C.   Strong, Weak                     ok

D.    Strong, Strong

 

Question No:9                              (Marks:1)                      Vu-Topper RM Which of the following function declaration is correct to overload the + operator as member function in Complex class?

A.    Complex +(const Complex & rhs);

B.     operator + Complex (const Complex & rhs);

C.   Complex operator +(const Complex & rhs);                 ok

D.    Complex operator + ::(const Complex & rhs);

 

Question No:10                            (Marks:1)                      Vu-Topper RM

Insertion operator is                                    associative.

A.    Left to Left

B.     Right to Left

C.   Left to Right               Page 160

D.    Right to Right

Question No:11                            (Marks:1)                      Vu-Topper RM Which of the following statement is TRUE about a class's Static Member Function?

A.    It can access non-static data members.

B.   It is used to access static data members only.                ok

C.     It can only be called by a particular object of class.

 

 




D.    It can access constant data members of the class.

 

Question No:12                            (Marks:1)                      Vu-Topper RM Which of the following is the correct way of declaring a constant variable named RollNo?

A.    const RollNo;

B.     int const rollNo;

C.     int RollNo const;

D.   const int RollNo;            ok

Question No:13                            (Marks:1)                      Vu-Topper RM

Which of the following is defined as stream extraction operator in C++?

A.    *<

B.     << 

C.     *>

D.   >>              Page 158

Question No:14                            (Marks:1)                      Vu-Topper RM

What will be the output of the following code? #include<iostream>

using namespace std; int main()

{

int const x = 10;cout << ++x;}

A. 10               ok

B. Run Time Error

C. 11

D. Compile time Error

Question No:15                            (Marks:1)                      Vu-Topper RM In C++, the subscript operator [] must be overloaded as a          of the class, with one parameter of            type.

 

 




A. Member function, int                      Google

B. Member function, char

C. Non-member function, int

D. Non-member function, char

 

Question No:16                            (Marks:1)                      Vu-Topper RM

We can get the address of a variable stored in a pointer using

                     :

A. :symbol

B. :: symbol

C. ->symbol

D. & symbol              Google                  ok

Question No:17                            (Marks:1)                      Vu-Topper RM Suppose "int a;" is a static data member of a class named test. Which of the following is the correct way of initializing the static variable outside the class test?

A. test a = 0;                    ok

B. int test::a = 0;

C. int test->a = 0;

 

Question No:18                            (Marks:1)                      Vu-Topper RM

                        Operator is used to create objects at run time.

A. New             Page 118                    ok

B. Create

C. Dynamic

D. Subscript

 

Question No:19                            (Marks:1)                      Vu-Topper RM Which of the following statement is NOT true about static variable of a class?

A. They are created even when there is no object of a class.

 

 




B. Static variable belongs to a particular instance of a class.

C. Static variable is initialized once only throughout the program.

D. They remain in memory even when all Objects of a class are destroyed.

Question No:20                            (Marks:1)                      Vu-Topper RM

Static Data Members can be accessed through                      .

A. Semi colon

B. Dot operator

C. Scope resolution operator

D. Dot operator and scope resolution operator               ok

 

Question No:21                            (Marks:1)                      Vu-Topper RM Suppose we have a class named “Student”; which of the following statement is correctly declaring the pointer to the object for “Student” class?

A. Student obj;

B. Student &obj;

C. Student *obj;              ok

D. *Student obj;

 

Question No:22                            (Marks:1)                      Vu-Topper RM Which of the following is the correct syntax of declaring static variable “count” of type int?

A. int static count;

B. int count static;

C. static count int;

D. static int count;                  ok

Question No:23                            (Marks:1)                      Vu-Topper RM In composition                    are called from composing objects to composed objects.

 

 




A. Pointers

B. Destructors                 Page 131                 ok

C. Constructors

D. Member Functions

 

Question No:24                            (Marks:1)                      Vu-Topper RM

In C++, Composition is a relationship between                            and

                                 objects.

A. Whole, part

B. Parent, child

C. Base, derived

D. All given options are correct.

Question No:25                            (Marks:1)                      Vu-Topper RM In which of the following OOP paradigm objects cannot exist independently?

A. Aggregation

B. Inheritance

C. Composition

D. Polymorphism                   Page 56

 

Question No:26                            (Marks:1)                      Vu-Topper RM

                remain in memory even when all objects of a class have been destroyed.

A. Primitive Variables

B. Static Data Members                  Page 114              ok

C. Constant Data Members

D. Instance Data Members

Question No:27                            (Marks:1)                      Vu-Topper RM

We can access a private static data member of a class through

                                    .

 

 




A. Static data member                  Google             ok

B. Global data member

C. Static member function

D. Global member function

 

Question No:28                            (Marks:1)                      Vu-Topper RM

Copy constructor is called when:

A. An object is deleted.

B. An object is created.

C. An array of objects is created.

D. An object is created in term of pre existing object.                   ok

 

Question No:29                            (Marks:1)                      Vu-Topper RM

In expression b = c / d , the arity of division (/) operator is                                                                                                               : A. 1

B. 4

C. 2                      ok

D. 3

 

Question No:30                            (Marks:1)                      Vu-Topper RM If you do not initialize static data member of a class of int type, it is automatically initialized with                 .

A. 0                     ok

B. 1

C. Null

D. -32767

 

Question No:31                            (Marks:1)                      Vu-Topper RM In composition                    are called from composed objects to composing objects.

A. Pointers

B. Variables

 

 



C. Destructors

D. Constructors               Page 130                 ok

 

Question No:32                            (Marks:1)                      Vu-Topper RM

In C++, which of the following is defined as stream insertion operator?

A. *<

B. <<               Page 158

C. *>

D. >>

Question No:33                            (Marks:1)                      Vu-Topper RM

Which of the following is an example of unary operator?

A. Division Operator ( / )

B. Equality Operator ( = =)

C. Inequality Operator ( != )

D. Increment Operator ( ++ )

Question No:34                            (Marks:1)                      Vu-Topper RM Which of the following issue(s) can be caused by the use of friend functions?

A. All of the given                    ok

B. Tough debugging

C. Data vulnerability

D. Programming bugs

 

Question No:35                            (Marks:1)                      Vu-Topper RM Identify which of the following overloaded operator function’s declaration is appropriate for the given call?

Rational_number_1 + 2.325 Where Rational_number_1

is an object of user defined class Rational_number.

A. operator+(double& obj);

 

 


B. None of the given choices

C. Rational_number operator+( Rational_number & obj);           ok

D. Rational_number operator+(Rational_number &obj, double& num);

Question No:36                            (Marks:1)                      Vu-Topper RM In C++, which of the following operator can only be overloaded as a member function of the class?

A. Equality Operator: ==

B. Function Operator: ()

C. Inequality Operator: !=

D. Stream Extraction Operator: >>

Question No:37                            (Marks:1)                      Vu-Topper RM

In                , Base class can’t always be replaced by the derived class.

Specialization

Question No:38                            (Marks:1)                      Vu-Topper RM

A class can have only                          destructor(s).

One

 

Question No:39                            (Marks:1)                      Vu-Topper RM Which of the following keyword tells the compiler to substitute the code within the function definition for every instance of a function call?

A. Inline                  ok

B. Virtual

C. Instance

D. Function

Question No:40                            (Marks:1)                      Vu-Topper RM

In OOP, we can achieve reusability through                       .

A. Inheritance                ok

 

 



B. Association

C. Data Hiding

D. Encapsulation

Question No:41                            (Marks:1)                      Vu-Topper RM

Through interface we represent object's                                      .

A. State

B. Class

C. Behavior               ok

D. Data members

 

Question No:42                            (Marks:1)                      Vu-Topper RM How many objects of a given class may be constructed in an application?

A. Only one per class

B. One object per variable

C. Only one per constructor.

D. As many as the application asks for              ok

 

Question No:43                            (Marks:1)                      Vu-Topper RM The process of extracting common characteristics from two or more classes and combining them into a superclass is called                    .

A. Abstraction

B. Composition

C. Generalization                ok

D. Specialization

 

Question No:44                            (Marks:1)                      Vu-Topper RM “Student registers Course and Teacher teaches the Course.” is an example of                           .

A. Binary Association                    ok

B. N-ary Association

 

 




C. Ternary Association

D. Two way Association

 

Question No:45                            (Marks:1)                      Vu-Topper RM

Which of the following concept is more close to encapsulation?

Information Hiding

Question No:46                            (Marks:1)                      Vu-Topper RM

Aggregation between objects shows that                            

Objects have weak relationship

 

Question No:47                            (Marks:1)                      Vu-Topper RM Identify the abstract class from the given statement: "Vehicle class is base class. Bus, Car, and Truck are derived classes."

Vehicle

 

Question No:48                            (Marks:1)                      Vu-Topper RM

An instance of user defined type is called              .

Object

Question No:49                            (Marks:1)                      Vu-Topper RM Enclosing all the characteristics of an object within the object itself is described as                   .


A. Inheritance

B. Abstraction

C. Encapsulation                 ok

D. Polymorphism

 

Question No:50                            (Marks:1)                      Vu-Topper RM

Which of the following is a strong relationship?

A. Association

B. Inheritance                   ok

 

 





C. Composition

D. Polymorphism

 

Question No:51                            (Marks:1)                      Vu-Topper RM

Composition is a strong relationship because

                                               .

A. Composed objects can exist independently.

B. Compose object cannot exist independently               ok

C. Composed objects are dependent on the relation type.

D. Composed object’s relationship depends on the number of objects.

 

Question No:52                            (Marks:1)                      Vu-Topper RM

Which of the following is NOT an access specifier in C++?

A. Public

B. Private

C. Hidden                ok

D. Protected

 

Question No:53                            (Marks:1)                      Vu-Topper RM

How can we identify classes from a given problem statement?

A. By extracting Verbs from problem statement

B. By extracting Adverbs from problem statement

C. By extracting Nouns from problem statement                    ok

D. By extracting Adjectives from problem statement

 

Question No:54                            (Marks:1)                      Vu-Topper RM

If class B inherits from class A then it contains all characteristics of

                     .

Class     A

 

Question No:55                            (Marks:1)                      Vu-Topper RM

Which of the following represents the two-way association?

 

 





Employee works for the company.

 

Question No:56                            (Marks:1)                      Vu-Topper RM

Constructor without any parameter is called                                             .


A. Copy constructor

B. Default constructor               ok

C. Overloaded constructor

D. Parameterized constructor

 

Question No:57                            (Marks:1)                      Vu-Topper RM

All objects of same class has                                   attributes.

A. Same                 ok

B. Double

C. Integer

D. Different

 

Question No:58                            (Marks:1)                      Vu-Topper RM

Mermaid is an example of                     .

A. Specialization

B. Polymorphism

C. Single inheritance                  ok

D. Multiple Inheritance

 

Description: A picture containing yellow, orange, amber, blur  Description automatically generated


Post a Comment

0Comments

Thanks everone

Post a Comment (0)