Skip to content

TypingDad logoTypingDadFree

Practice that's friendly and fast

⚡ C++ Programs

105 Essential Programs from Beginner to Advanced

Your Progress

0/105Total
0/20Beginner
0/35Intermediate
0/50Advanced
105Total Programs
20Beginner
35Intermediate
50Advanced
14Categories

Filter by Category

Filter by Level

105 programs shown
🟢

Hello World

#1

Print Hello World

BeginnerBasics
🟢

Read and Print

#2

Read user input and print

BeginnerBasics
🟢

Add Two Numbers

#3

Add two integers

BeginnerBasics
🟢

Swap Numbers

#4

Swap using temp variable

BeginnerBasics
🔵

Largest of Two

#5

Find largest of two numbers

BeginnerConditions
🔵

Even or Odd

#6

Check even or odd

BeginnerConditions
🔄

Factorial

#7

Find factorial of number

BeginnerLoops
🔄

Fibonacci

#8

Print Fibonacci series

BeginnerLoops
🧠

Reverse Number

#9

Reverse digits of number

BeginnerLogic
🧠

Prime Check

#10

Check if number is prime

BeginnerLogic
📝

Palindrome String

#11

Check palindrome string

BeginnerStrings
📊

Sum of Array

#12

Find sum of array elements

BeginnerArrays
📊

Largest in Array

#13

Find largest element

BeginnerArrays
📝

Count Vowels

#14

Count vowels in string

BeginnerStrings
🧠

Sum of Digits

#15

Sum digits of a number

BeginnerLogic
🔵

Leap Year check

#16

Check if leap year

BeginnerConditions
🔵

Switch Calculator

#17

Basic int calculator

BeginnerConditions
🧠

Armstrong Number

#18

Check Armstrong number

BeginnerLogic
🔄

Multiplication Table

#19

Print multiplication table

BeginnerLoops
🟢

ASCII Value

#20

Find ASCII of character

BeginnerBasics
📊

Reverse Array

#21

Reverse array in place

IntermediateArrays
📊

Binary Search

#22

Binary search implementation

IntermediateArrays
📝

Anagram Check

#23

Check if strings are anagrams

IntermediateStrings
🏗️

Class Basics

#24

Basic class and object

IntermediateOOP
🏗️

Inheritance

#25

Basic inheritance

IntermediateOOP
🏗️

Polymorphism

#26

Virtual functions & overriding

IntermediateOOP
📦

Vector Basics

#27

Dynamic arrays (STL)

IntermediateSTL
📦

Map Basics

#28

Key-value pairs (STL)

IntermediateSTL
📚

Exception Handling

#29

Try / Catch mechanics

IntermediateError Handling
📚

Read Text File

#30

Read lines from file

IntermediateFile I/O
💾

Pointers Basics

#31

References and Addresses

IntermediateMemory
⚙️

Pass by Reference

#32

Function arguments

IntermediateFunctions
📝

String to Int

#33

parseInt using stoi

IntermediateStrings
📦

Sort Vector

#34

Custom sort std::sort

IntermediateSTL
🚀

Lambda Functions

#35

C++11 Lambdas

IntermediateC++11
🚀

Auto Keyword

#36

Type inference

IntermediateC++11
🏗️

Structs vs Classes

#37

Basic Struct

IntermediateOOP
💾

Dynamic Memory

#38

new and delete

IntermediateMemory
🏗️

Friends

#39

Friend functions

IntermediateOOP
🏗️

Operator Overload

#40

Overloading + operator

IntermediateOOP
🚀

Smart Pointers

#41

unique_ptr / shared_ptr

AdvancedC++11
🚀

Move Semantics

#42

std::move & rvalues

AdvancedC++11
🧩

Template Functions

#43

Generics in C++

AdvancedTemplates
🧩

Template Classes

#44

Generic classes

AdvancedTemplates

Threads Basics

#45

std::thread C++11

AdvancedConcurrency

Mutex

#46

std::mutex locking

AdvancedConcurrency

Async Tasks

#47

std::async & futures

AdvancedConcurrency
🧮

Dijkstra Shortest Path

#48

Using priority_queue

AdvancedDSA
🧮

Depth First Search

#49

Graph DFS

AdvancedDSA
🧮

Breadth First Search

#50

Graph BFS

AdvancedDSA
📦

Stack Implementation

#51

Using STL Stack

IntermediateSTL
📦

Queue Implementation

#52

Using STL Queue

IntermediateSTL
📦

Deque Basics

#53

Double ended queue

IntermediateSTL
📦

Set Basics

#54

Unique elements

IntermediateSTL
📦

Unordered Map

#55

Hash map implementation

IntermediateSTL
📦

Priority Queue

#56

Max heap by default

AdvancedSTL
📦

Min Priority Queue

#57

Min heap using functional logic

AdvancedSTL
📝

String Stream

#58

Parsing strings

IntermediateStrings
📝

Substrings

#59

Extract substring

IntermediateStrings
📝

String Find

#60

Find character or substring

IntermediateStrings
🏗️

Function Overloading

#61

Same function name, different args

IntermediateOOP
⚙️

Default Arguments

#62

Parameters with defaults

IntermediateFunctions
⚙️

Inline Functions

#63

Request inline expansion

IntermediateFunctions
🟢

Macro usage

#64

Using #define macros

IntermediateBasics
💾

Const Keyword

#65

Constants references and pointers

IntermediateMemory
💾

Static Variables

#66

Retain state in functions

IntermediateMemory
💾

Dynamic Array (new[])

#67

Array allocated at runtime

IntermediateMemory
💾

Multidimensional Array

#68

2D array allocation

AdvancedMemory
🚀

Shared Pointer

#69

std::shared_ptr

AdvancedC++11
🚀

Weak Pointer

#70

std::weak_ptr preventing cycles

AdvancedC++11
📚

Exception class

#71

Custom exception handling

AdvancedError Handling
🏗️

Multiple Inheritance

#72

Class inheriting from multiple classes

AdvancedOOP
🏗️

Virtual Destructor

#73

Prevent memory leak in polymorphism

AdvancedOOP
🏗️

Abstract Class

#74

Pure virtual functions

AdvancedOOP
📚

Write File

#75

std::ofstream to write

IntermediateFile I/O
📚

Append to File

#76

ios::app flag

IntermediateFile I/O
📚

Read words from file

#77

Using >> operator with file

IntermediateFile I/O
🏗️

Copy Constructor

#78

Deep copy semantics

AdvancedOOP
🏗️

Assignment Operator

#79

Overloading operator=

AdvancedOOP
🚀

Enum Classes

#80

Strongly typed enums

IntermediateC++11
🚀

Tuple Basics

#81

Return multiple values

IntermediateC++11
🚀

Structured Binding

#82

Unpack tuples (C++17)

AdvancedC++11
🚀

Optional (C++17)

#83

std::optional usage

AdvancedC++11
🚀

Variant (C++17)

#84

std::variant type safe union

AdvancedC++11
🚀

Any (C++17)

#85

std::any type erasure

AdvancedC++11
📦

Algorithms: count

#86

std::count elements

IntermediateSTL
📦

Algorithms: find

#87

std::find iterator

IntermediateSTL
📦

Algorithms: accumulate

#88

Summing range

IntermediateSTL
📦

Lower Bound

#89

Binary search first >= element

AdvancedSTL
📦

Upper Bound

#90

Binary search first > element

AdvancedSTL
📦

Next Permutation

#91

Lexicographical permutation

AdvancedSTL
🟢

Bitwise Operations

#92

AND OR XOR

IntermediateBasics
🟢

Shift Operators

#93

Left / Right Bit Shift

IntermediateBasics
⚙️

Function Pointers

#94

Pointer to a function

AdvancedFunctions
🚀

std::function

#95

Functional wrapper (C++11)

AdvancedC++11
🚀

Regex Basics

#96

std::regex regex_match

AdvancedC++11
🚀

Time Execution

#97

std::chrono timing

AdvancedC++11
🧩

Type Traits

#98

is_integral compile time check

AdvancedTemplates
🧩

SFINAE

#99

Substitution Failure Is Not An Error

AdvancedTemplates
🚀

Constexpr

#100

Compile time evaluation

AdvancedC++11
💾

Placement New

#101

Construct object at memory address

AdvancedMemory

Condition Variable

#102

Thread signaling

AdvancedConcurrency

Atomic Variables

#103

std::atomic lock free

AdvancedConcurrency
🟢

Union Basics

#104

Memory-sharing data struct

IntermediateBasics
📦

Bitset

#105

std::bitset arrays of bits

IntermediateSTL