This page lists every C program on the site, organised by topic for quick reference — from simple beginner programs to sorting algorithms, data structures, file handling, matrices, and strings. Bookmark it and use it as your practice roadmap.
New to C? Set up your compiler first (it takes only a few minutes): Install GCC on Windows 11, on macOS Tahoe, or skip installation entirely with an online C compiler. For the best experience, set up VS Code for C programming.
Simple C Programs
- Arithmetic Operators
- ++ and — Operators
- Global and Internal Variables
- Extern Variables
- Bitwise operators
- Size of data Types
- Switch Statement
- Ternary Condition(?)
- Format
- Enumeration Example
- Functions
- Multiplication table
- Do statement
- Sum Digits of Integer
- Pyramid Pattern
- Name Sort
- Variable Values
- Data Types
- Surface area and Volume of Cube
- Roots of Quadratic equation
- Find Variance,Mean, Standard Deviation
- Simple Interest
- Area of Circle
- Find Triangle Type
- Hello World
- Area of Isosceles Triangle
- Biggest of three numbers
- Sleep() Example
- Unions example
- #Define pre processor
- #if,#else,#endif
- Convert days to years,weeks and Days
- Time Functions
C Programs on Arrays
- Insert into Array
- Array summation
- Sum and Average
- Array Deletion
- Split the Array
- Size of Array
- Sum of 2D array using DMA
- Array Addition
- Array Search
- Cyclically Permute the Array
C Programs For Sorting Algorithms
- Bubble Sort
- Insertion Sort
- Heap Sort
- Merge Sort
- Quick Sort
- Shell Sort
- Bucket Sort
- Radix Sort
- Selection Sort
- String Sort
- Sort Linked List
- Topological Sort
C Programs for Searching
C Programs on Graphs and Trees
Various C Programs on Numbers
- Binary to Decimal
- Binary to Decimal,Octal,Hexadecimal
- Roman to Decimal
- Decimal to Binary
- Palindrome
- Binary to 2’s complement
- GCD and LCM
- Fibonacci Numbers
- Find Quadrant
- Prime Number
- Complex Numbers
- Sum of Digits
- Swap Numbers
- Cos(x)
- Sin(x)
- X^N
- Polynomial Series
- ODD or EVEN
- nPr and nCr.
- Square and Cube
- Armstrong Number
- Perfect Number
- Random Number
C Programs on Files and File handling
- File operations
- Disk Read
- File Copy
- Reverse File contents
- fgets function
- Sequential File
- File characters count
C Programs on Matrix
- Addition, Subtraction and Trace of Matrices
- Transpose of a matrix
- Multiplication of Matrices
- Elements Sum of a Matrix
- Equal matrices
- Identity Matrix
- Even and Odd elements in a Matrix
- Inter change diagonal Elements of a Matrix
- Sort Row and Column of a Matrix
- Sparse Matrix
- Inverse of a Matrix
C Programs on Linked List, Stack & Queues
- Linear Queue
- Priority ASC order Queue
- Priority DSC order Queue
- Reverse a Linked List
- Two Stacks on single array
- Circular Queue
- Multiple Priority Queue
- Linked List Creation
- Linked List Operations
- Singly Linked List
- Doubly Linked list
- Stack Implementation
- Sequential File
- Infix to Postfix
- Postfix Evaluation
- Binary Search Tree
- Stack using Linked List
- Queue using Linked List
- Stack using Arrays