OOP - Model Exam Question Bank
OOP - Model Exam Question Bank
(Autonomous)
Department of Computer Science and Engineering
PART - A
1. Define Constants with example.
2. Write a C++ program to check whether a person is eligible to vote using if statement.
3. What are the advantages of object-oriented programming (OOP)?
10. What are the ways to create an object using parameterized constructor?
13. Difference between static data member and static member functions.
14. List the properties of static members and static member function.
17. What is a pure virtual function? Explain use of pure virtual function with an example
20. What are the points to be noted while deriving anew class?
29. Write the process of open , read , write and close files?
PART B
Write a C++ program to find the largest of the element from an array.
3.
Write in detail about the inline function with example.
4. Explain the control flow statements in C++ with example.
7. Illustrate with Example about Constructor and types and Write a Program to Illustrate Copy Constructor
8. .What is a Friend function? Describe their benefits and limitations? Give Suitable example
Write a C++ Program to create a Person class with a name and age as private members. Implement a
9. parameterized constructor to initialize these members with given values. Write a method to display the
person's details.
Explain the concept of a class in programming, including its declaration, accessspecifiers, definition of
10. class members, methods, and the process of creating an object. Provide a suitable example program to
illustrate these concepts.
11. What is inheritance? How does it enable code reusability, explain with an example?
12. Differentiate between virtual function and virtual class. Also explain the rules for virtual function.
13. Explain the role of constructors and destructors in inheritance in C++ with suitable example
14. Write a C++ program to demonstrating hierarchical inheritance to get the square and cube of a number:
What is operator Overloading? Write down a C++ program to adding complex numbers using operator
15.
overloading.
Explain about the virtual function and pure virtual function. Design a class hierarchy with a base class
16. Shape and derived classes Circle, Square, and Triangle. Implement a virtual function area() in the Shape
class, and override it in the derived classes to return the correct area for each shape
17. Explain the concept of a pure virtual function and abstract class in C++with an example.
19. Describe the process of file handling in c++ using iostream classes.
21. Write a C++program involving reading and writing of classs objects in a file