Skip to content
VUBuddy

CS304 Midterm Past Paper 6

Object Oriented Programming PDF 69 KBUpdated 23 Oct 2026
Midterm past paper CS304 Midterm Past Paper 6 PDF 69 KB
vubuddy.com
Type
Midterm past paper
Course
CS304 Object Oriented Programming
Size
PDF 69 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 69 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 6. Download the file for all 6 pages.

MIDTERM EXAMINATION

CS304- Object Oriented Programming (Session - 2)

Q1. Which part of an object exhibits its state? (1 marks)

  1. Data
  2. Operations
  3. Any public part
  4. Any private part

Q2. Inheritance is a way to (1 marks)

  1. organize data.
  2. pass arguments to objects of classes.
  3. add features to existing classes without rewriting them.
  4. improve data-hiding and encapsulation.

Q3. Suppose you have been given the following design, (1 marks)

"A person has a name, age, address and -----. 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?

  1. registration date and diagnosis
  2. age and -----
  3. ----- and diagnosis
  4. diagnosis and age

Q4. What problem(s) may occur when we copy objects without using deep copy constructor? (1 marks)

  1. Dangling pointer
  2. Memory Leakage
  3. All of the given
  4. System crash

Q5. this pointers are not accessible for static member functions. (1 marks)

  1. True
  2. False

Q6. A static member function cannot be declared. (1 marks)

  1. Static
  2. Implicit
  3. Explicit
  4. Virtual

Q7. _______ remain in memory even when all objects of a class have been destroyed. (1 marks)

  1. Static variables
  2. Instance variable
  3. Primitive variables
  4. None of given

Q8. Friend functions are _____________ functions of a class. (1 marks)

  1. None of given
  2. object member
  3. non-member
  4. data member

Q9. ___________, 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. (1 marks)

  1. Friendship is one way only
  2. Friendship is two way only
  3. NO Friendship between classes
  4. Any kind of friendship

Q10. The statement objA=objB; will cause a compiler error if the objects are of different classes. (1 marks)

  1. True
  2. False

Q11. Identify which of the following overloaded operator function’s declaration is appropriate for the given call? (1 marks)

Rational_number_1 + 2.325 Where Rational_number_1 is an object of user defined class Rational_number.

All CS304 files →
CS304 Object Oriented Programming All CS304 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.