CPP Question Bank
CPP Question Bank
1. List any six keywords used in C++ for Object Oriented Concepts (3)
2. List and explain data types in C++ with sizes in bytes(3)
3. What is the use of scope resolution operator?(2)
4. Explain insertion and extraction operators in C++(2).
5. Write the purpose of New and Delete operators.(2)
6. What is a reference variable?(2)
7. Explain two manipulators with examples.(2)
Chapter 2 Classes and Objects
1. Enumerate object oriented concepts in C++.(3)
2. Explain access specifiers in C++.(3)
3. Can we define member functions outside the class? Give an example.(5)
4. Differentiate between string and character array.
5. Explain push_back and resize string functions.(2)
6. Explain pop_back, length and capacity string functions. (3)
7. Write a C++ program to read two strings and swap them using swap string function.
Display length of both strings(3)
8. Define ‘this’ pointer. State the purpose of ‘this’ pointer.
9. Write a program to create an array of ten objects of Student(rollno, name, percentage)
class and sort the array on percentage. (5)
10. .
Chapter 6 Inheritance
1. Define inheritance.
2. What are the types of inheritance.
3. Short note on Multiple inheritance, multilevel inheritance, hierarchical
inheritance,Hybrid inheritance
4. What is the calling sequence of constructors and destructors in inheritance?
5. How the ambiguity problem in multiple inheritance is resolved?
6. Create a class Shape with abstract methods area() and volume(). Derive classes
Cube(side) and Cone(radius, height) from Shape and calculate area and volume for each
shape.
7. Define virtual base class.
8. Short note on virtual base class.