C++ Module-2 QB
C++ Module-2 QB
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.