Q Bank
Q Bank
1. What is the need of data types in C++? Describe different data types along with their
representations and size in C++.
2. What are the different ways to define member functions of a class. What is the role of scope
resolution operator in the definition of member function?
3. What is the need of passing objects as arguments. Discuss different ways to pass objects as
arguments to a function.
4. Discuss default constructor and parameterized constructor with the help of an example in C++.
5. Write down the example of dynamic constructor in C++.
6. Write a C++ program demonstrating use of the pure virtual function with the use of base and
derived classes.
7. What is a user defined exception. Write down the scenario where we require user defined
exceptions.
12. Write a C++ program to update the contents of a file by accessing the contents randomly.
13. Explain public, private and protected access specifiers and show their visibility when they are
inherited as public, private and protected.
14. What is a virtual function? Write rules for virtual function. Explain wit example.
15. Explain friend function with example and list sum of the special properties of friend function.
21. Define polymorphism and Explain Virtual functions with example. What is the difference
between static & dynamic binding?
22. What is Standard Template Library? How is it different from the C++ Standard Library?
23. Write C++ program to find sum of three integer float number using templet class.
24. What is exception handling ? Explain types of exception handling and explain suitable example.
25. Q: Write a C++ program to display names, roll nos and grades of 3 students who have appeared
in the examination. Declare the class of name, roll nos and grade. Create an array of class
objects. Read and display the contents of the array
……………………………………………………………………………………………………………
1 What is an object and class?
b) Write a C++ program to generate Fibonacci series using recursion with member function
example
example.
15 a) What is Operator overloading? Write a C++ program illustrating overloading NEW and
DELETE operators?
b) Define array and explain about types of arrays in C++ with example.
b) Explain about the various types of access specifiers are used in C++
8 What are destructors? When they are called? What is their utility?
b) Write a C++ program illustrating Queue data structure? Ensure your program contains
special member functions like
constructors, copy constructors and Destructors to create and destroy Queue objects?
12 a) Write a C++ program to calculate simple interest and compound interest
13 a) Write a C++ program to display names, rollnos and grades of 3 students whohave
appeared in the examination. Declare the class of name, rollnos and grade. Create an array of class
objects.
16 a) Explain about the various types of access specifiers are used in C++, explain with
examples.
………………………………………………………………………………………………………………………………………………………………
12 a) Describe the three different inheritance behaviors achieved through the use of pure
virtual, ordinary virtual and non virtual functions?
13 a) What is inheritance? How does it enable code reusability, explain with an example?
14 a) Write a program to define virtual, non virtual functions and determine size of the object
b) What are virtual functions? Describe the rules for declaring virtual functions?
and compute Net salary of each employee (DA=52% of Basic and Income Tax (IT) =30% of the gross
salary).
10 What are the several special functions that are used to perform formmated IO operations
located in iomanip.h headerfile.
4 Describe the role of keywords try, throw and catch in exception handling.