⚡ C++ Programs
105 Essential Programs from Beginner to Advanced
Your Progress
Filter by Category
Filter by Level
Hello World
#1Print Hello World
Read and Print
#2Read user input and print
Add Two Numbers
#3Add two integers
Swap Numbers
#4Swap using temp variable
Largest of Two
#5Find largest of two numbers
Even or Odd
#6Check even or odd
Factorial
#7Find factorial of number
Fibonacci
#8Print Fibonacci series
Reverse Number
#9Reverse digits of number
Prime Check
#10Check if number is prime
Palindrome String
#11Check palindrome string
Sum of Array
#12Find sum of array elements
Largest in Array
#13Find largest element
Count Vowels
#14Count vowels in string
Sum of Digits
#15Sum digits of a number
Leap Year check
#16Check if leap year
Switch Calculator
#17Basic int calculator
Armstrong Number
#18Check Armstrong number
Multiplication Table
#19Print multiplication table
ASCII Value
#20Find ASCII of character
Reverse Array
#21Reverse array in place
Binary Search
#22Binary search implementation
Anagram Check
#23Check if strings are anagrams
Class Basics
#24Basic class and object
Inheritance
#25Basic inheritance
Polymorphism
#26Virtual functions & overriding
Vector Basics
#27Dynamic arrays (STL)
Map Basics
#28Key-value pairs (STL)
Exception Handling
#29Try / Catch mechanics
Read Text File
#30Read lines from file
Pointers Basics
#31References and Addresses
Pass by Reference
#32Function arguments
String to Int
#33parseInt using stoi
Sort Vector
#34Custom sort std::sort
Lambda Functions
#35C++11 Lambdas
Auto Keyword
#36Type inference
Structs vs Classes
#37Basic Struct
Dynamic Memory
#38new and delete
Friends
#39Friend functions
Operator Overload
#40Overloading + operator
Smart Pointers
#41unique_ptr / shared_ptr
Move Semantics
#42std::move & rvalues
Template Functions
#43Generics in C++
Template Classes
#44Generic classes
Threads Basics
#45std::thread C++11
Mutex
#46std::mutex locking
Async Tasks
#47std::async & futures
Dijkstra Shortest Path
#48Using priority_queue
Depth First Search
#49Graph DFS
Breadth First Search
#50Graph BFS
Stack Implementation
#51Using STL Stack
Queue Implementation
#52Using STL Queue
Deque Basics
#53Double ended queue
Set Basics
#54Unique elements
Unordered Map
#55Hash map implementation
Priority Queue
#56Max heap by default
Min Priority Queue
#57Min heap using functional logic
String Stream
#58Parsing strings
Substrings
#59Extract substring
String Find
#60Find character or substring
Function Overloading
#61Same function name, different args
Default Arguments
#62Parameters with defaults
Inline Functions
#63Request inline expansion
Macro usage
#64Using #define macros
Const Keyword
#65Constants references and pointers
Static Variables
#66Retain state in functions
Dynamic Array (new[])
#67Array allocated at runtime
Multidimensional Array
#682D array allocation
Shared Pointer
#69std::shared_ptr
Weak Pointer
#70std::weak_ptr preventing cycles
Exception class
#71Custom exception handling
Multiple Inheritance
#72Class inheriting from multiple classes
Virtual Destructor
#73Prevent memory leak in polymorphism
Abstract Class
#74Pure virtual functions
Write File
#75std::ofstream to write
Append to File
#76ios::app flag
Read words from file
#77Using >> operator with file
Copy Constructor
#78Deep copy semantics
Assignment Operator
#79Overloading operator=
Enum Classes
#80Strongly typed enums
Tuple Basics
#81Return multiple values
Structured Binding
#82Unpack tuples (C++17)
Optional (C++17)
#83std::optional usage
Variant (C++17)
#84std::variant type safe union
Any (C++17)
#85std::any type erasure
Algorithms: count
#86std::count elements
Algorithms: find
#87std::find iterator
Algorithms: accumulate
#88Summing range
Lower Bound
#89Binary search first >= element
Upper Bound
#90Binary search first > element
Next Permutation
#91Lexicographical permutation
Bitwise Operations
#92AND OR XOR
Shift Operators
#93Left / Right Bit Shift
Function Pointers
#94Pointer to a function
std::function
#95Functional wrapper (C++11)
Regex Basics
#96std::regex regex_match
Time Execution
#97std::chrono timing
Type Traits
#98is_integral compile time check
SFINAE
#99Substitution Failure Is Not An Error
Constexpr
#100Compile time evaluation
Placement New
#101Construct object at memory address
Condition Variable
#102Thread signaling
Atomic Variables
#103std::atomic lock free
Union Basics
#104Memory-sharing data struct
Bitset
#105std::bitset arrays of bits
