154+ Code Examples

C Programming Examples

Master C programming with our comprehensive collection of practical examples. Each program includes detailed explanations, step-by-step execution, and sample outputs.

154+
Programs
12
Categories
74
Beginner
10
Advanced
🚀

Basic Programs

Fundamental C programs for beginners

🔀

Control Flow

Decision making, loops, and conditional programs

Beginner

Check Positive, Negative, or Zero

Determine sign of a number

Beginner

Check Whether Number is Even or Odd

Determine if number is even or odd

Beginner

Check Whether Character is Vowel or Consonant

Character classification

Beginner

Find Largest Number Among Three

Find maximum among three numbers

Beginner

Calculate Sum of Natural Numbers

Calculate 1+2+3+...+n

Beginner

Print Alphabets From A to Z Using Loop

Display all alphabets

Beginner

Check Leap Year

Determine if year is leap year

Beginner

Find Factorial of a Number

Calculate n! using loop

Beginner

Make a Simple Calculator

Calculator using switch-case

Beginner

Generate Multiplication Table

Generate multiplication table

Beginner

Print Fibonacci Series

Print Fibonacci sequence

📚 Intermediate

Find LCM of Two Numbers

Find least common multiple

📚 Intermediate

Check Armstrong Number

Verify Armstrong property

📚 Intermediate

Display Armstrong Numbers Between 1 to 1000

Find all Armstrong numbers in range

📚 Intermediate

Display Armstrong Numbers Between Two Intervals

Find Armstrong numbers in given range

Beginner

Reverse a Number

Reverse digits of a number

📚 Intermediate

Check Whether Number is Palindrome

Number reads same forwards/backwards

📚 Intermediate

Check Whether Number is Prime

Prime check using loops

📚 Intermediate

Display Prime Numbers Between Intervals

Print primes in a range

📚 Intermediate

Check Whether Number is Neon Number

Check if sum of digits squared equals number

Beginner

Find All Factors of a Natural Number

Find all divisors

📚 Intermediate

Sum of Fibonacci Numbers at Even Indexes

Sum Fibonacci at even positions

Pattern Printing

Star, number, and character patterns

🔄

Functions & Recursion

Functions and recursive programs

📊

Arrays & Matrices

Array manipulation and matrix operations

Beginner

Print a 2D Array

Display 2D array elements

Beginner

Find Largest Element in Array

Find maximum value

Beginner

Find Maximum and Minimum in Array

Find both min and max

📚 Intermediate

Search Element in Array (Binary Search)

Search in sorted array

Beginner

Calculate Average of Array Elements

Calculate array average

📚 Intermediate

Sort Array Using Bubble Sort

Sort using bubble sort

🔥 Advanced

Sort Array Using Merge Sort

Sort using merge sort

📚 Intermediate

Sort Array Using Selection Sort

Sort using selection sort

📚 Intermediate

Sort Array Using Insertion Sort

Sort using insertion sort

Beginner

Sort Array in Descending Order

Sort from high to low

Beginner

Sort Array in Ascending Order

Sort from low to high

📚 Intermediate

Remove Duplicate Elements From Sorted Array

Remove duplicates

Beginner

Merge Two Arrays

Combine two arrays

📚 Intermediate

Remove All Occurrences of Element

Remove specific element

📚 Intermediate

Find Common Array Elements

Find intersection

Beginner

Copy All Elements to Another Array

Array copy

📚 Intermediate

Array Rotation

Rotate array elements

📚 Intermediate

Sort 2D Array Across Rows

Sort each row of 2D array

Beginner

Check Whether Two Matrices Are Equal

Compare two matrices

Beginner

Find the Transpose of Matrix

Transpose a matrix

🔥 Advanced

Find Determinant of Matrix

Calculate determinant

📚 Intermediate

Find Normal and Trace of Matrix

Calculate normal and trace

Beginner

Add Two Matrices

Matrix addition

📚 Intermediate

Multiply Two Matrices

Matrix multiplication

📚 Intermediate

Print Boundary Elements of Matrix

Print border elements

Beginner

Compute Sum of Diagonals of Matrix

Sum diagonal elements

📝

Strings

String manipulation programs

🔄

Conversions

Type and number system conversions

📍

Pointers

Pointer-based programs

🏗️

Structures & Unions

User-defined data types

📁

File I/O

File handling programs

🕐

Date & Time

Date and time programs

💡

More C Programs

Miscellaneous useful programs

Want In-Depth Learning?

These examples are great for practice. For comprehensive explanations of C concepts, explore our structured tutorials.

Browse All Tutorials