A collection of C++ programs covering Programming Fundamentals (PF) and Object-Oriented Programming (OOP) concepts. This repository serves as a learning resource for students and beginners who want to understand core C++ concepts through practical examples.
- Input and Output
- Variables and Data Types
- Operators
- Conditional Statements (
if,if-else,switch) - Loops (
for,while,do-while) - Functions
- Arrays (1D & 2D)
- Strings and Character Arrays
- Searching Algorithms
- Sorting Algorithms
- Pattern Printing
- Number-Based Problems
- Pointer Basics
- Pointer Arithmetic
- Passing Pointers to Functions
- Dynamic Memory Allocation
- Arrays and Pointers
- Creating and Using Structures
- Arrays of Structures
- Nested Structures
- Passing Structures to Functions
- Classes and Objects
- Constructors and Destructors
- Encapsulation
- Abstraction
- Inheritance
- Polymorphism
- Function Overloading
- Operator Overloading
- Friend Functions
- Static Members
- Composition
- File Handling with Classes
- File Handling
- Exception Handling
- Templates
- Standard Library (STL) Basics
- Practice Problems
- Lab Exercises
- Assignment Solutions
Programming-Fundamentals/
│── Basics/
│── Conditionals/
│── Loops/
│── Functions/
│── Arrays/
│── Strings/
│── Pointers/
│── Structures/
│── Searching/
│── Sorting/
│── Recursion/
│── Pattern-Problems/
│── OOP/
│ ├── Classes/
│ ├── Inheritance/
│ ├── Polymorphism/
│ ├── File-Handling/
│ └── Projects/
└── README.md
- C++ Compiler (GCC, G++, Clang, or MSVC)
- Code Editor (Visual Studio Code, Code::Blocks, Dev-C++, CLion, or any preferred IDE)
Compile the program:
g++ filename.cpp -o programRun the executable:
./programThis repository is intended to:
- Practice Programming Fundamentals.
- Learn Object-Oriented Programming in C++.
- Prepare for quizzes, lab exams, assignments, and technical interviews.
- Provide beginner-friendly examples with clean and readable code.
Suggestions, improvements, and additional examples are always welcome. Feel free to fork the repository and submit a pull request.
This repository is available for educational purposes. You are free to use, modify, and learn from the code while giving appropriate credit where applicable.