Question Bank C++
Question Bank C++
QUESTION BANK
UNIT-1
S.No Questions BT CO PO
Part – A (Short Answer Questions)
1 What is an object and class? BT2 CO1 PO1
2 Explain the structure of C++ Program with an example BT1 CO1 PO1
3 Define Operators, Evaluation of expressions BT2 CO1 PO1
4 Define abstraction, encapsulation with syntax BT2 CO1 PO1
5 Define inheritance and polymorphism. BT3 CO1 PO2
6 What is recursion? Explain recursive with an example BT3 CO1 PO2
S.No Questions BT CO PO
Part – A (Short Answer Questions)
1 How to create classes and objects in C++ with example. BT2 CO2 PO2
2 Difference between static data member and static member BT1 CO2 PO1
functions.
3 Explain about static keyword? BT3 CO2 PO2
4 Write the structure of class BT3 CO2 PO2
5 Explain the concept of Data abstraction. BT2 CO2 PO3
6 What is copy constructor, explain with example BT2 CO2 PO1
7 Explain Constructor with syntax. BT1 CO2 PO1
8 What are destructors? When are they called? What is their BT3 CO2 PO2
utility?
9 What is mean by implicit and explicit constructors BT3 CO2 PO2
10 Define constant function. BT2 CO2 PO3
Part – B (Long Answer Questions)
11 a) What are Constructors? How many types of constructors are BT3 CO2 PO2
there?
b) Write a C++ program illustrating Queue data structure? Ensure BT3 CO2 PO3
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 BT3 CO2 PO2
interest
b) Explain the concept of Data abstraction with example BT3 CO2 PO2
13 a) Write a C++ program to display names, rollnos and grades of BT2 CO2 PO2
3 students who have appeared in the examination. Declare the
class of name, rollnos and grade. Create an array of class objects.
Read and display the contents of the array
b) Explain Constant member functions with example BT3 CO2 PO3
14 a) Explain Static class members with example BT3 CO2 PO2
b) Write a C++ program to implement static keyword and explain BT2 CO2 PO1
15 a) What is a Friend class, explain with example. BT3 CO2 PO2
b) Write a C++ program to find Armstrong number BT2 CO2 PO2
16 a) Explain about the various types of access specifiers are used in BT2 CO2 PO3
C++, explain with examples.
S.No Questions BT CO PO
Part – A (Short Answer Questions)
1 Define the Base and Derived classes BT1 CO3 PO1
b) Differentiate between virtual function and virtual class. Also BT3 CO3 PO3
explain the rules for virtual function
12 a) Describe the three different inheritance behaviors achieved BT3 CO3 PO2
through the use of pure virtual, ordinary virtual and non-virtual
functions?
13 a) What is inheritance? How does it enable code reusability, explain BT3 CO3 PO2
with an example?
b) Explain the different types of inheritances used in C++ BT3 CO3 PO2
14 a) Write a program to define virtual, non-virtual functions and BT2 CO3 PO2
determine size of the object
b) What are virtual functions? Describe the rules for declaring BT2 CO3 PO2
virtual functions?
15 a) What is polymorphism in C++. Explain about its types with BT2 CO3 PO2
example
16 a) Write a C++ program to read the data of N employee BT3 CO3 PO2
and compute Net salary of each employee (DA=52% of
Basic and Income Tax (IT) =30% of the gross salary).
b) Write a program to destroy the constructor. BT3 CO3 PO2
C++ I/O
S.No Questions BT CO PO
Part – A (Short Answer Questions)
1 Define Overloading operators BT1 CO4 PO1
2 Explain I/O using C functions BT2 CO4 PO2
3 Explain Stream classes hierarchy BT2 CO4 PO2
4 Define Stream I/O BT2 CO4 PO2
5 Define File streams and list out them BT2 CO4 PO3
6 Define String streams BT1 CO4 PO2
7 Define functions of ios class BT2 CO4 PO2
8 Define few special manipulator functions used to perform BT2 CO4 PO2
formatted IO in C++
9 Define few error handling functions BT1 CO4 PO1
10 What are the several special functions that are used to perform BT2 CO4 PO2
formatted IO operations located in iomanip.h headerfile.
Part – B (Long Answer Questions)
11 a) Explain File streams in C++ BT2 CO4 PO2
b) Explain String streams with example BT1 CO4 PO2
13 a) Why we use getline() and write () functions, explain with BT2 CO4 PO2
example
b) Error handling during file operations with example BT2 CO4 PO3
14 Formatted IO using ios class members with example BT1 CO4 PO2
15 Formatted IO using manipulators with example BT1 CO4 PO2
EXCEPTION HANDLING
PART- A (SHORT ANSWER QUESTIONS)
S.No Questions BT CO PO
Part – A (Short Answer Questions)
1 What do you mean by exception handling. BT2 CO5 PO2
2 Discuss the benefits of exception handling. BT2 CO5 PO2
3 Explain about rethrowing an exception. BT1 CO5 PO3
4 Describe the role of keywords try, throw and catch in exception BT1 CO5 PO2
handling.
5 What do you mean by stack unwinding. BT2 CO5 PO2
6 Discuss about exception objects. BT1 CO5 PO2
7 What is rethrowing an exception BT2 CO5 PO2
8 how exceptions are handled in C++ BT2 CO5 PO1
9 Explain multiple catch handlers. BT2 CO5 PO2
10 Explain few C++ Standard Exceptions BT3 CO5 PO2
Part – B (Long Answer Questions)
11 a) Explain C++ Standard Exceptions and describe them BT2 CO5 PO3
b) Write a C++ to illustrate the concepts of console I/O operations. BT2 CO5 PO2
with example