Skip to content
VUBuddy

CS304P Quiz 3 Set 4

Object Oriented Programming (Practical) PDF 855 KBUpdated 23 Oct 2026
Quiz CS304P Quiz 3 Set 4 PDF 855 KB
vubuddy.com
Type
Quiz
Course
CS304P Object Oriented Programming (Practical)
Size
PDF 855 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 855 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 page 1 of 1. Download the file for all 1 page.

VU TOOLKIT · CS304P - Quiz No.3 · Date: 06 May 2026

Q1. In classes which of the following is default access specifier?

  1. None of the given option
  2. Protected
  3. Private
  4. Public

Correct answer: Private

Q2. Following code is equivalent to which option. class Shape { string type; };

  1. class Shape { private: string type; };
  2. class Shape { public: string type; };
  3. class Shape { protected: string type; };
  4. class Shape public: { public: string type; };

Correct answer: class Shape { private: string type; };

Q3. Which of the following is the default access specifier for members of a class?

  1. protected and public
  2. protected and private
  3. public
  4. private

Correct answer: private

Q4. Which of the following option is false?

  1. Private members can be accessed using friend functions
  2. Data members can’t be inherited
  3. Public members are accessible from other classes also
  4. Member functions can be made private

Correct answer: Data members can’t be inherited

Q5. Which of the given option is not correct for destructor?

  1. Destructor is a function with the same name as that of class but preceded with a tilde ~
  2. Destructor is a function with the same name as that of class, but preceded with a tilde 'void ~'
  3. Destructor is used to free the memory allocated through dynamic allocation.
  4. Destructor is used to free the memory allocated through new operator.

Correct answer: Destructor is a function with the same name as that of class, but preceded with a tilde 'void ~'

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.