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

C++ Module-2 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 topics such as operator overloading, class definitions, constructors, destructors, and static members, along with example programs. The questions are designed to assess students' understanding of key C++ concepts and programming skills.

Uploaded by

Rajesh.S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

C++ Module-2 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 topics such as operator overloading, class definitions, constructors, destructors, and static members, along with example programs. The questions are designed to assess students' understanding of key C++ concepts and programming skills.

Uploaded by

Rajesh.S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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 2

Sl. Questions
No.
1. Define operator overloading. Give the syntax of the operator function with an example.
2. Define class. Write the general syntax of a class with a suitable example.
3. List out the operators that cannot be overloaded.
4. Discuss about the constructors. Illustrate the usage of a constructor with an example.
5. Explain the dynamic initialization of objects. Illustrate the same with an example.
6. Discuss the importance of destructor with its syntax and characteristics.
7. Briefly explain scope resolution operator with an example.
8. Construct a C++ program to read employee details by creating a class Employee. Also, find
the net salary of an employee.
9. Explain about the static member functions with an example program.
10. Write a C++ program to add two complex numbers by overloading the + operator.
11. Interpret the concept of friend function along with their characteristics. Illustrate it with an
example.
12. Discuss the rules for overloading operators.
13. Explain the concept of unary operator overloading. Write an example program to overload
Minus(-) operator.
14. Explain parameterized constructors in detail.
15. Briefly explain the concept of static data members.
16. Illustrate the usage of copy constructor with an example.
17. Write a C++ program to read and display student information by defining the member
functions inside the class.

Rajesh S Asst Professor MUSE 1

You might also like