C++ Master Question
C++ Master Question
GUESS QUESTIONS
BY HARSHIT
Evolution of C++:
1979: Bjarne Stroustrup started developing "C with Classes."
1983: Officially renamed as "C++."
1990: ANSI C++ standardization started.
1998: C++98 was introduced with core features.
2011, 2014, 2017, 2020: New standards like C++11, C++14, C++17, and C++20 added
modern features like lambda expressions, smart pointers, and modules.
Aspect C C++
Preprocessor Directives:
Main Function:
Variable Declarations:
Return Statement:
Example program:
2. Abstraction: Hides implementation details and shows only the essential features of
an object. Achieved using abstract classes and interfaces. For Example:
An object is an instance of a class. It holds the data defined in the class and can
perform operations using the methods of the class.
Output:
Syntax:
Example Program:
Output:
2. Multiple Inheritance: A derived class inherits from more than one base class.
4. Hierarchical Inheritance: Multiple derived classes inherit from a single base class.
Output:
Output:
Output:
Output:
Output:
Output:
Output:
Example Command:
Output:
Output: