Skip to content
VUBuddy

CS304 Midterm Solved Paper 2

Object Oriented Programming PDF 215 KBUpdated 23 Oct 2026
Midterm past paper CS304 Midterm Solved Paper 2 PDF 215 KB
vubuddy.com
Type
Midterm past paper
Course
CS304 Object Oriented Programming
Size
PDF 215 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 215 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 5. Download the file for all 5 pages.

CS304 - Object Oriented Programming

Q1. 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

Q2. 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? (1 marks)

  1. The automatic assignment operator is used
  2. The copy constructor is used
  3. Compiler error
  4. Run-time error

Q3. a’A static member function can be called, even when a class is not (1 marks)

  1. Declared
  2. Define
  3. Instantiated
  4. Called

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

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

  1. Rational_number operator+( Rational_number & obj);
  2. Rational_number operator+(double& obj); (Page 145)
  3. Rational_number operator+(Rational_number &obj, double& num);
  4. operator+(double& obj);

Q5. __________ provide the facility to access the data member. (1 marks)

  1. accesser function (Page 68)
  2. private function
  3. inline function
  4. None of the given

Q6. Constant objects cannot change their state, (1 marks)

  1. True (Page 105)
  2. False

Q7. The ________ relationship indicates that an object contains other objects. (1 marks)

  1. None of given

(Page 53)

  1. ‘has-a’
  2. ‘is-a’
  3. ‘be-

Q8. Which one of the following features of OOP is used to derive a class from another? (1 marks)

Polymorphism

  1. Inheritance

(Page 25)

Q9. Please choose (1 marks)

one _______ is a relationship

  1. Inheritance

(Page 25)

Q10. __________ satisfy the condition of polymorphism (1 marks)

Carbon Diamond Coal

  1. all of the given

(Page 56)

Q11. A generalization-specialization relation between classes are implemented using (1 marks)

friend classes

  1. inheritance (Page 49)

Q12. The >= operator can be overloaded. (1 marks)

  1. True (Page 140)
  2. False

Q13. In order to free the memory occupied by the object, we use ------------- (1 marks)

  1. Constructor
  2. Destructor (Page 92)

Shallow Copy Deep Copy

Q14. Which of the following is not an example of multiple inheritances?---------- Mermaid (1 marks)

Woman (Lecture No.5)

Amphibious Vehicle

Q15. Static variable can be initialized more than once. (1 marks)

True False

Q16. A generic class showing all the common attributes and a behavior of other classes represents a very important feature in oop called -------- (1 marks)

  1. Inheritance

(Page 26)

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.