CS304 MID TERM SOLVED MCQs || PAST PAPERS || GROUP-1 || 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
Which part of an object exhibits its state?
a) Data
b) Operations
c) Any public part
d) Any private part
Correct Answer:
The correct answer is 'a'.
Question No: 2
Inheritance is a way to _____ .
a) Organize data
b) Pass arguments to objects of classes.
c) Add features to existing classes without rewriting them.
d) Improve data-hiding and encapsulation
Correct Answer:
The correct answer is 'c'.
Question No: 3
Suppose you have been given the following design,
"A person has a name, age, address and sex. You are designing a class to represent a type of person called a patient. This kind of person may be given a diagnosis, have a spouse and may be alive".
Given that the person class has already been created, what of the following would be appropriate to include when you design the patient class?
a) Registration Date and Diagnosis
b) Age and Sex
c) Sex and Diagnosis
d) Diagnosis and Age
Correct Answer:
The correct answer is 'a'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com
Question No: 4
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: 5
These pointers are not accessible for static member functions.
a) True
b) False
Correct Answer:
The correct answer is 'a'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com
Question No: 6
A static member function cannot be declared.
a) Static
b) Implicit
c) Explicit
d) Virtual
Correct Answer:
The correct answer is 'd'.
Question No: 7
_________ remain in memory even when all objects of a class have been destroyed.
a) Static variables
b) Instance variable
c) Primitive variables
d) None of given
Correct Answer:
The correct answer is 'a'.
Question No: 8
Friend functions are ______ functions of a class.
a) None of given
b) Object member
c) Non-member
d) Data member
Correct Answer:
The correct answer is 'c'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com
Question No: 9
______ , which means if A declares B as its friend it does NOT mean that A can access private data of B. It only means that B can access all data of A.
a) Friendship is one way only
b) Friendship is two way only
c) No Friendship between classes
d) Any kind of friendship
Correct Answer:
The correct answer is 'a'.
Question No: 10
The statement obj A = obj B; will cause a compiler error if the objects are of different classes.
a) True
b) False
Correct Answer:
The correct answer is 'a'.
Visit Website For More Solutions
www.vutechofficial.blogspot.com