CPP_Programming_Short_Notes
CPP_Programming_Short_Notes
1. Introduction to C++:
language.
#include <iostream>
int main() {
// Code
return 0;
5. Operators in C++:
- Arithmetic: +, -, *, /, %
6. Control Statements:
C Programming - Short Notes
- switch statement
7. Loops in C++:
- for loop
- while loop
- do-while loop
8. Functions in C++:
Example:
return a + b;
- Encapsulation
- Inheritance
- Polymorphism
- Abstraction
class Student {
public:
int id;
void display() {
};
C Programming - Short Notes
12. Inheritance:
class A { };
class B : public A { };
- OOP support
- Code reusability