Skip to content
VUBuddy

CS304 Midterm Past Paper 5

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

MIDTERM EXAMINATION · Spring 2010 · CS304- Object Oriented Programming (Session - 6)

Time: 60 min Marks: 38

Q1. Suppose there is an object of type Person, which of the following can be considered as one of its attributes (1 marks)

  1. Name
  2. Age
  3. Work()
  4. Both Name and Age

Q2. What a derived class can add? (1 marks)

  1. New data members
  2. New member functions and New friend functions
  3. New constructors and destructor
  4. All of given

Q3. ________ is/are used to access information hidden within an object? (1 marks)

  1. Interface
  2. Private data members
  3. Private member functions
  4. Both public and private members

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

  1. True
  2. False

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

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

Q6. C++ compiler does not allow to dynamically allocate memory for objects (1 marks)

  1. False
  2. True

Q7. Given the following class (1 marks)

class Base{ int Age=33;

How you can improve above class with respect to accessing the field Age?

  1. Define the variable Age as private
  2. Define the variable Age as protected
  3. Define the variable Age as private and create a get method that returns it and a set method that updates it
  4. Define the variable Age as protected and create a set method that returns it and a get method that updates it

Q8. Friend class and friend function can be used as an alternate to each other (1 marks)

  1. True
  2. False

Q9. Which of the following operators always takes no argument if overloaded? (1 marks)

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

Q11. Assume a class C with objects obj1, obj2, and obj3. For the statement obj3 = obj1 - obj2 to work correctly, if the overloaded - operator must (1 marks)

  1. take two arguments.
  2. return a value.
  3. create a named temporary object.
  4. take four arguments

Q12. Which operator can not be overloaded? (1 marks)

  1. The relation operator ( >= )
  2. Assignment operator ( = )
  3. Script operator ( [] )
  4. Conditional operator (? : )

Q13. We achieve independence of internal implementation from its external interface through-- (1 marks)

  1. Encapsulation
  2. Information Hiding
  3. Abstraction
  4. both encapsulation and information hiding

Q14. Which one of the following is not an object association? (1 marks)

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

Q15. We capture the object attributes and behavior in Object Oriented programming using------ (1 marks)

  1. Class
  2. Function
  3. Data Members
  4. Instances
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.