Q1: What is Abstraction?
Answer: Abstraction is the concept of hiding unnecessary details and showing only the essential features of an object. It focuses on what an object does rather than how it works.
Q2: What is a Class Diagram?
Answer: A class diagram is a graphical representation that shows classes, their attributes, methods, and the relationships between different classes in a system.
Q3: What is Method Overriding?
Answer: Method overriding occurs when a derived class provides its own implementation of a method that is already defined in its base class with the same name and parameters.
Q4: What is Operator Overloading?
Answer: Operator overloading is a feature in which operators like +, −, or == are given different meanings depending on the type of operands used with them.
Q5: What is Method Overloading?
Answer: Method overloading is the ability to define multiple methods with the same name in a class but with different numbers or types of parameters.
Q6: What is Polymorphism?
Answer: Polymorphism means “many forms.” It allows the same function or operator to perform different tasks depending on the data type or object used.
Q7: What is Inheritance?
Answer: Inheritance is the ability of a class to acquire properties and behaviors from another class. It helps in code reusability.
Q8: What is a Base Class?
Answer: A base class is the class whose properties and methods are inherited by another class. It is also called a parent or superclass.
Q9: What is a Concrete Class?
Answer: A concrete class is a class that can be instantiated directly to create objects because it does not contain any abstract methods.
Q10: What are Data Members?
Answer: Data members are variables declared inside a class that store the data of objects.
Q11: What is a Constructor?
Answer: A constructor is a special member function of a class that is automatically called when an object of the class is created. It initializes the object.
Q12: What is a Destructor?
Answer: A destructor is a special member function that is automatically called when an object is destroyed. It releases resources used by the object.
Q13: What is a Global Variable?
Answer: A global variable is a variable that can be accessed from any part of the program because it is declared outside all functions.
Q14: What is a Local Variable?
Answer: A local variable is a variable declared inside a function and can only be used within that function.
Q15: What is a Null Pointer?
Answer: A null pointer is a pointer that does not point to any memory location. It usually contains the value zero.
Q16: What is a Pointer?
Answer: A pointer is a variable that stores the memory address of another variable.
Q17: What is Protected in C++?
Answer: The protected access specifier allows class members to be accessed within the class and by derived classes, but not by other parts of the program.
Q18: What is OOP?
Answer: Object Oriented Programming (OOP) is a programming approach that uses objects and classes to design software. It focuses on data and functions together.
Q19: What are the Elements of OOP?
Answer: The main elements of OOP are Object, Class, Method, Encapsulation, Information Hiding, Inheritance, and Polymorphism.
Q20: What are the Characteristics of OOP?
Answer: Key characteristics of OOP include data hiding, use of objects, modularity, inheritance, and communication between objects.
Q21: What are the Basic Concepts of OOP?
Answer: The basic concepts of OOP are Object, Class, Encapsulation, Data Abstraction, Inheritance, Polymorphism, Message Passing, and Dynamic Binding.
Q22: What is an Object?
Answer: An object is an instance of a class that contains data and functions which operate on that data.
Q23: What is Encapsulation?
Answer: Encapsulation is the process of combining data and functions into a single unit and restricting direct access to some of the object’s components.
Q24: What is a Class?
Answer: A class is a blueprint or template used to create objects. It defines data members and member functions.
Q25: What is a Meta-Class?
Answer: A meta-class is a class whose objects are themselves classes. It defines how classes behave.
Q26: What is the Difference Between Object-Based and Object-Oriented Programming?
Answer: Object-based programming uses objects but does not support inheritance and polymorphism, while object-oriented programming supports objects, inheritance, and polymorphism.