CS304 MID TERM SOLVED MCQs || PAST PAPERS || GROUP-2 || OBJECT ORIENTED
PROGRAMMING || VuTech
Visit Website For More Solutions
www.vutechofficial.blogspot.com
CS304
Object Oriented Programming
Solved Mid Term Past Papers
______________________________
MCQs
______________________________
Question No: 1
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) Rational_number operator+( Rational_number & obj);
b) Rational_number operator+(double& obj);
c) Rational_number operator+(Rational_number &obj, double&
num);
d) Operator+(double& obj);
Correct Answer:
The correct answer is 'b'.
Question No: 2
Which operator can not be overloaded?
a) The relation operator ( >= )
b) Assignment operator ( = )
c) Script operator ( [] )
d) Conditional operator (? : )
Correct Answer:
The correct answer is 'd'.
Question No: 3
To convert from a user-defined class to a basic type, you would most likely
use
a) A built-in conversion operator
b) A one-argument constructor
c) An overloaded = operator
d) A conversion operator that’s a member of the class
Correct Answer:
The correct answer is 'd'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com
Question No: 4
The technique in which we visualize our programming problems according to
real life’s problems is called ________ .
a) Structured programming
b) Subject Oriented Programming
c) Procedural Programming
d) None of the given
Correct Answer:
The correct answer is 'b'.
Question No: 5
In object orientated programming, a class of objects cans ______ properties
from another class of objects.
a) Utilize
b) Borrow
c) Inherit
d) Adopt
Correct Answer:
The correct answer is 'c'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com
Question No: 6
A C++ class is similar to _______ .
a) Structure
b) Header File
c) Library File
d) None of the given
Correct Answer:
The correct answer is 'a'.
Question No: 7
What problem(s) may occur when we copy objects without using deep copy
constructor?
a) Dangling pointer
b) Memory Leakage
c) All of the given
d) System crash
Correct Answer:
The correct answer is 'c'.
Question No: 8
Suppose that the Test class does not have an overloaded assignment
operator. What happens when an assignment a=b; is given for two Test objects
a and b?
a) The automatic assignment operator is used
b) The copy constructor is used
c) Compiler error
d) Run-time error
Correct Answer:
The correct answer is 'b'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com
Question No: 9
A static member function can be called, even when a class is not ______
.
a) Declared
b) Define
c) Instantiated
d) Called
Correct Answer:
The correct answer is 'c'.
Question No: 10
_______ provide the facility to access the data member.
a) Accessor function
b) Private function
c) Inline function
d) None of the given
Correct Answer:
The correct answer is 'a'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com