Skip to content
VUBuddy

CS304P Quiz 9

Object Oriented Programming (Practical) PDF 844 KBUpdated 23 Oct 2026
Quiz CS304P Quiz 9 PDF 844 KB
vubuddy.com
Type
Quiz
Course
CS304P Object Oriented Programming (Practical)
Size
PDF 844 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 844 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.

CS304P - Quiz No.9

Date: 28 December 2025

Q1. There are ________ types of inheritance in C++.

  1. 4
  2. 3
  3. 2
  4. 1

Correct answer: 4

Q2. Which of the following is not the correct type of inheritance in C++?

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

Correct answer: secret

Q3. class A { public: int Test(int x) {return x*x;} int Test(int x,int y) {return x*y;} }; class B : public A { public: int Test(int x) { return x*x*x;} }; In the above class, the method Test is_______.

  1. None of the given options
  2. Overridden
  3. Overloaded
  4. Both

Correct answer: Both

Q4. For the given class definition, which one is correct? #include<iostream> using namespace std; class A{ int x,y; public: int Add(int a,int b){return a+b;} int Add(int c){return c;} };

  1. Function Add has an error
  2. Function Add is overloaded
  3. None of the given options
  4. Function Add is overridden

Correct answer: Function Add is overloaded

Q5. In case of public inheritance between Base class A and Derived class B, which of the folllowing data members of Base class will be hidden in Derived class?

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

Correct answer: private

Generated With VU Toolkit Made with ♥ by Paradoxical

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.