A comprehensive collection of 150+ C++ programs covering everything from basics to advanced OOP concepts.
This repository documents my complete C++ programming journey — from writing my first "Hello World" to implementing advanced Object-Oriented Programming concepts. Each program is organized by topic and includes practical examples that demonstrate core C++ concepts.
| Topic | Description |
|---|---|
| 01. Basics | Variables, Data Types, Constants, I/O Operations, Naming Conventions |
| 02. Arithmetic Instructions | Mathematical Expressions, Operators, Increment/Decrement |
| 03. Conditional Statements | If-Else, Switch Case, Comparison Operations |
| 04. Operators | Bitwise, Logical, Relational Operators |
| 05. Loops | For, While, Do-While Loops |
| 06. Patterns | Star Patterns, Number Patterns, Pyramid Patterns |
| Topic | Description |
|---|---|
| 07. Functions | Function Declaration, Overloading, Default Parameters, Friend Functions |
| 08. Strings | String Manipulation, Operations |
| 09. Pointers | Pointer Basics, Pointer to Pointer, this Pointer |
| 10. Arrays | 1D/2D Arrays, Array Operations |
| Topic | Description |
|---|---|
| 12. Object-Oriented Programming | Complete OOP Implementation |
| ↳ Abstraction | Access Modifiers, Data Hiding |
| ↳ Encapsulation | Classes and Objects |
| ↳ Inheritance | Single, Multiple, Multi-level, Hierarchical, Hybrid |
| ↳ Polymorphism | Function Overloading, Overriding, Virtual Functions |
| ↳ Constructors | Default, Parameterized, Copy, Destructor |
| 13. Searching & Sorting | Linear Search, Bubble Sort |
| Folder | Description |
|---|---|
| Important Questions | Prime Numbers, Palindrome, Fibonacci, Call by Value/Reference |
| HackerRank | Practice problem solutions |
| Practice C++ | Additional practice programs |
| CA 206 (C++) | Academic coursework and lab reports |
Cpp-Programs/
├── 01.Basic/ # Fundamentals & Syntax
├── 02.Arithmetic Instructions/ # Math Operations
├── 03.Conditional/ # Decision Making
├── 04.Operator/ # Operators
├── 05.Loop/ # Iterations
├── 06.Patterns/ # Pattern Programs
├── 07.Function/ # Functions
├── 08.String/ # String Operations
├── 09.Pointers/ # Pointer Concepts
├── 10.Array/ # Array Operations
├── 12.Oops/ # Object-Oriented Programming
│ ├── Abstraction/
│ ├── Constructor/
│ ├── Inheritance/
│ └── Polymorphism/
├── 13.Searching & Sorting/ # Algorithms
├── HackerRank/ # Competitive Programming
├── Important Question/ # Key Concepts
├── Practice C++/ # Practice Programs
└── CA 206 (C++)/ # Academic Work
└── Lab Report/
- C++ Compiler (GCC/G++, MinGW, or MSVC)
- Any IDE/Text Editor (VS Code, Code::Blocks, Dev-C++)
# Clone the repository
git clone https://github.com/your-username/Cpp-Programs.git
# Navigate to the directory
cd Cpp-Programs# Compile the program
g++ "filename.cpp" -o output
# Run the executable
./output # Linux/Mac
output.exe # Windows- Open the
.cppfile in your preferred IDE - Build/Compile the program
- Run the executable
| Program | Location | Concepts |
|---|---|---|
| Calculator | Calculator with C++.cpp |
OOP, Classes |
| Exception Handling | Exception Handling.cpp |
Try-Catch Blocks |
| Virtual Functions | 12.Oops/Polymorphism/ |
Runtime Polymorphism |
| Inheritance Types | 12.Oops/Inheritance/ |
All 5 Inheritance Types |
| Bubble Sort | 13.Searching & Sorting/ |
Sorting Algorithm |
- ✅ Basic Syntax & I/O
- ✅ Control Structures
- ✅ Functions & Recursion
- ✅ Arrays & Pointers
- ✅ Object-Oriented Programming
- ✅ Exception Handling
- ✅ Basic Data Structures
Feel free to fork this repository and add your own programs or improvements!
This project is open source and available for educational purposes.
⭐ Star this repository if you find it helpful!
Made with ❤️ while learning C++