Skip to content
VUBuddy

CS304 Midterm MCQs Set 2 by VU Topper RM

Object Oriented Programming PDF 537 KBUpdated 23 Oct 2026
Midterm past paper CS304 Midterm MCQs Set 2 by VU Topper RM PDF 537 KB
vubuddy.com
Type
Midterm past paper
Course
CS304 Object Oriented Programming
Size
PDF 537 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 537 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 2, 3, 4 of 14. Download the file for all 14 pages.

Q1. Vu-Topper RM (1 marks)

Which of the following best describes relationship between Book and BookChapter classes?

  1. Association
  2. Inheritance
  3. Aggregation
  4. Composition

Correct answer: Composition

Q2. Vu-Topper RM (1 marks)

The keyword "friend" should be placed in ___________ : A. Main Function B. Function Definition C. Anywhere in program

D. Function Declaration Google

Q3. Vu-Topper RM (1 marks)

Which of the following stores the address of a variable?

  1. Pointer
  2. Function
  3. Destructor
  4. Constructor

Correct answer: Pointer

Q4. Vu-Topper RM (1 marks)

_____ is creating objects of one class inside another class. A. Association B. Inheritance C. Aggregation

D. Composition Page 125

Q5. Vu-Topper RM (1 marks)

Which of the following can be used as an alternative to static members?

  1. Local Variables
  2. Array of Objects
  3. Global Variables
  4. Constant Variables

Correct answer: Global Variables

Q6. Vu-Topper RM (1 marks)

What is the general syntax of overloading Unary Operator as member function of the class?

  1. TYPE & operator OP ();
  2. TYPE & operator OP (int);
  3. TYPE & operator OP (TYPE &);
  4. TYPE & operator OP (TYPE &, TYPE &);

Correct answer: TYPE & operator OP ();

Q7. Vu-Topper RM (1 marks)

Which of the following operators operate on one operand?

  1. Unary Operators
  2. Ternary Operator
  3. Binary Operators
  4. All of the given options

Correct answer: Unary Operators

Q8. Vu-Topper RM (1 marks)

Composition is __________ and aggregation is ____________ relationship. A. Weak, Weak B. Weak, Strong

C. Strong, Weak

D. Strong, Strong

Q9. Vu-Topper RM (1 marks)

Which of the following function declaration is correct to overload the + operator as member function in Complex class?

  1. Complex +(const Complex & rhs);
  2. operator + Complex (const Complex & rhs);
  3. Complex operator +(const Complex & rhs);
  4. Complex operator + ::(const Complex & rhs);

Correct answer: Complex operator +(const Complex & rhs);

Q10. Vu-Topper RM (1 marks)

Insertion operator is ________________ associative. A. Left to Left B. Right to Left

C. Left to Right Page 160

D. Right to Right

Q11. Vu-Topper RM (1 marks)

Which of the following statement is TRUE about a class's Static Member Function?

  1. It can access non-static data members.
  2. It is used to access static data members only.
  3. It can only be called by a particular object of class.
  4. It can access constant data members of the class.

Correct answer: It is used to access static data members only.

Q12. Vu-Topper RM (1 marks)

Which of the following is the correct way of declaring a constant variable named RollNo?

  1. const RollNo;
  2. int const rollNo;
  3. int RollNo const;
  4. const int RollNo;

Correct answer: const int RollNo;

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.