Top 25 C++ Programming Viva Questions
Top 25 C++ Programming Viva Questions
Basics of C++
1. What is C++?
C++ is an object-oriented programming language developed by Bjarne Stroustrup as
an extension of C. It supports procedural, object-oriented, and generic programming.
5. What is an object?
An object is an instance of a class. It represents a real-world entity with properties and
behaviors defined by its class.
3. OOP Concepts
7. What is encapsulation?
Encapsulation is the process of bundling data and functions into a single unit (class)
and restricting access using access specifiers (private, protected, public).
8. What is inheritance?
Inheritance allows a class (derived class) to acquire properties and behaviors of
another class (base class). Types include:
1. Single inheritance
2. Multiple inheritance
3. Multilevel inheritance
4. Hierarchical inheritance
5. Hybrid inheritance
9. What is polymorphism?
Polymorphism means "many forms." It allows a single function or operator to behave
differently based on context. Types:
4. Functions
1. Default constructor
2. Parameterized constructor
3. Copy constructor
5. Memory Management
6. Operator Overloading
8. Exception Handling
10. Miscellaneous