0% found this document useful (0 votes)
20 views

C++ Module-3 QB

The document is a question bank for the Programming in C++ course (21CD45) for the academic year 2024-2025 at Mysore University. It includes various questions related to inheritance concepts, types, access specifiers, and practical programming tasks. The questions aim to assess understanding of inheritance in C++ through definitions, examples, and programming exercises.

Uploaded by

Rajesh.S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

C++ Module-3 QB

The document is a question bank for the Programming in C++ course (21CD45) for the academic year 2024-2025 at Mysore University. It includes various questions related to inheritance concepts, types, access specifiers, and practical programming tasks. The questions aim to assess understanding of inheritance in C++ through definitions, examples, and programming exercises.

Uploaded by

Rajesh.S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming in C++ (21CD45) 2024-2025

MYSORE UNIVERSITY SCHOOL OF ENGINEERING


Manasa Gangotri campus, Mysore 570006
(Approved by AICTE, New Delhi)
DEPARTMENT OF COMPUTER SCIENCE AND DESIGN
Academic Year: 2024-25
Course: B.E
Sub: Programming in C++
Semester: 4
Subject code: 21CD45
Question Bank – Module 3

Sl. Questions
No.

1. Define Inheritance. Explain how derived classes are defined with a suitable example.
2. Discuss about different types of Inheritance.
3. Briefly explain how the private member can be Inherited.
4. Interpret single Inheritance with a suitable example.
5. Define hybrid Inheritance. Illustrate it with an example.
6. Briefly explain the concept of virtual base class.
7. Interpret how the protected members of the base class can be Inherited.
8. Explain protected access specifier with an example.
9. Discuss how the public members of the base class be Inherited.
10.Illustrate how the constructors are invoked in Inheritance.
11.Write a C++ program to read and display employee details using the concept of Inheritance.
12.Briefly explain the concept of multiple Inheritance with suitable example.
13.Demonstrate how the ambiguities of multiple Inheritance can be resolved with an example.
14.Demonstrate how the derived classes are defined with a suitable example.
15.Explain the effects of private access specifier on visibility of base class and derived class.
16.Explain base class and derived class with an example.
17.Discuss about multilevel inheritance in detail.
18.Explain the various visibility inheritance modes with an example.
19.Explain the diamond problem of inheritance in C++ with an example.

Rajesh S Asst Professor MUSE 1


Programming in C++ (21CD45) 2024-2025

20.Construct a C++ program to create a base class Book and derive two new classes Engineering
book and Novel. Use suitable member and member functions to illustrate hierarchical
inheritance.
21.Interpret the differences between public and private inheritance.
22.Construct a C++ program to create a base class ‘Student’ and derive two new classes, ‘Test’
and ‘Marks’ respectively. Class Student stores the roll number, class Test stores the marks
obtained in two subjects and class Result contains the total marks obtained in the test. Use
suitable member functions to display the roll number, two subject marks and total marks.
23.Explain the order of invocation of constructors and destructors in inheritance with a suitable
example.
24.Illustrate single inheritance for private and public derivation.

Rajesh S Asst Professor MUSE 2

You might also like