Skip to content
VUBuddy

CS304P Lab Quiz 5 by VUBuddy

Object Oriented Programming (Practical) PDF 851 KBUpdated 23 Oct 2026
Quiz CS304P Lab Quiz 5 by VUBuddy PDF 851 KB
vubuddy.com
Type
Quiz
Course
CS304P Object Oriented Programming (Practical)
Size
PDF 851 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 851 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 20. Download the file for all 20 pages.

Q1. Which of the following is a weak relationship?

  1. Inheritance
  2. Composition
  3. Association

Q2. Which of the following is true about the aggregation?

  1. Aggregation is a weak relationship.

The aggregation is a relationship between container and contained objects. studywithhamza25 b. c. The life of the sub-object is dependent on the life of the master class. d. All of the given options

Q3. Which of the following offers a programmer the facility of using a specific class object into other classes?

  1. Polymorphism
  2. Inheritance
  3. Abstraction

Q4. Why do we need relationships between classes?

  1. To enhance the communication between classes
  2. All of the given option. studywithhamza25
  3. To use the functionality of one class into derived classes
  4. To increase code re-usability

Q5. Which of the following creates the strongest relationship between two objects?

  1. Aggregation
  2. Composition
  3. Association

Q6. What is the purpose of new operator?

  1. Used to declare any new thing in a program
  2. Used as return type when an object is created
  3. Allocates memory for an object or array and returns a

particular pointer. studywithhamza25 d. Allocates memory for an object or array

Q7. Which of the following is true about the friend functions?

  1. All of the given options. studywithhamza25
  2. Access specifiers has no impact on friend functions or classes
  3. Friend functions can be placed anywhere in the class
  4. Prototypes of friend functions appear in the class definition.

Q8. A doctor can see patients. This type of relationship is known as ________.

  1. Two-way Association. studywithhamza25
  2. One-way Association
  3. Binary Association
  4. Ternary Association

Q9. In C++, if new operator is used, when is the constructor called?

  1. After the allocation of memory
  2. Depends on code
  3. Constructor is called to allocate memory
  4. Before the allocation of memory. studywithhamza25 10.

When an object of a class is the data member of another class, it is called as _________. a. inheritance b. Association c. aggregation

11. In the call by reference method, which operator is used to get the address of a variable? a. % b. &

d. # 12. Which of the following two arrays are copy-able? a. int a[4], int b[5] b. int a[5], float b[5] c. float a[4], int b[5] d. int a[5], int b[5] . studywithhamza25 13. Which of the following is the correct way to initialize all the elements of array with 0?

All CS304P files →
CS304P Object Oriented Programming (Practical) All CS304P 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.