This page contains the list of C programming examples which covers the concepts like basic c programs, programs on numbers, loop programs, functions, recursions etc.

**TIP:** Please visit our C Programming section to learn C Programming with examples.

All the C programming examples that are present in this page might contain at least three examples, which includes program using For Loop, using While Loop, Functions. In some case, Recursions.

## Simple C Programming Examples

The following C programming examples are the basic and simple programs

- Hello World
- Add Two Numbers
- Compound Interest
- Cube of a Number
- Even or Odd
- Even Numbers from 1 to N
- Largest of Two Numbers
- Largest of Three Numbers
- Multiplication Table
- Number is Divisible by 5 and 11
- Odd Numbers from 1 to N
- Print an Integer, Character, and Float Value
- Positive or Negative Number
- Power of a Number
- Print 1 to 100 without using Loop
- Profit or Loss
- Roots of a Quadratic Equation
- Simple Interest
- Standard Deviation
- Sum of Even and Odd numbers in a Given Range
- Square of a Number
- Square root of a Number
- Sum of Even Numbers from 1 to n
- Sum of Odd Numbers from 1 to n
- Student Grade
- Total, Average, and Percentage of Five Subjects

## C Programming Examples on Numbers

- Armstrong Number
- Count Number of Digits in a Number
- Check the Number is a Prime, Armstrong, or Perfect Number
- Calculate Electricity Bill
- Factors of a Number
- Factorial of a Given Number
- First Digit of Number
- First and Last Digit of a Number
- GCD of Two Numbers
- Generic Root of a Number
- Gross Salary of an Employee
- Last Digit of Number
- LCM of Two Numbers
- NCR Factorial of a Number
- Natural Numbers from 1 to N
- Natural Numbers in Reverse Order
- Palindrome or Not
- Perfect Number or Not
- Prime Number
- Prime Numbers from 1 to 100
- Product of Digits of a Number
- Prime Factors of a Number
- Reverse a Number
- Swap Two Numbers
- Sum of First and Last Digit of a Number
- Swap First and Last Digit of a Number
- Sum of N Natural Numbers
- Sum and Average of N Numbers
- Strong Number
- Sum of Digits in a Given Number
- Simple Calculator
- Total Notes in a Given Amount

## Calendar Programs in C

## Conversion Programs in C

Following are the list of C programs to Convert

- Centimeter to Meter and Kilometer
- Celsius to Fahrenheit
- Decimal to Binary Number
- Decimal to Octal Number
- Fahrenheit to Celsius
- Kilometer to Meter Centimeter and Millimeter

## C Programs on Characters

Below programs are the C Programs to Check whether the Character is

- ASCII Value of Single Character
- ASCII Values of all Characters
- Alphabet or Not
- Alphabet or Digit
- Convert Character to Uppercase
- Convert Character to Lowercase
- Digit or Not
- Digit or Alphabet or Special Character
- Lowercase or Not
- Lowercase or Uppercase Alphabet
- Print Alphabets from a to z
- Print Alphabets between A and Z
- Uppercase or Not
- Vowel or Consonant

## C Programming Examples on String

- ASCII Value of Total Characters in a String
- All Occurrence of a Character in a String
- Characters in a String
- Compare two Strings
- Concatenate Two Strings
- Copy String
- Count Alphabets, Digits and Special Characters in a String
- Count Vowels, and Consonants in a String
- Counting All Occurrence of a Character in a String
- Count Total Number of Words in a String
- Frequency of each Character in a String
- First Occurrence of a Character in a String
- First Occurrence of a Word in a String
- Last Occurrence of a Character in a String
- Length of a String
- Lowercase to Uppercase
- Maximum Occurring Character in a string
- Minimum Occurring Character in a String
- Palindrome String
- Remove First Occurrence of a Character in a String
- Remove Last Occurrence of a Character in a String
- Removing All Occurrences of a Character in a String
- Remove All Duplicate Characters in a String
- Replace First Occurrence of a Character in a String
- Replace Last Occurrence of a Character in a String
- Replacing All Occurrence of a Character in a String
- Reverse a String
- Reverse Order of Words in a String
- Toggle Case of all Characters in a String
- Uppercase to Lowercase

## C Programming Examples on Area

Following are the list of Area programs in C language

- Area of a Circle
- Diameter, Circumference, and Area of a Circle
- Area of a Triangle
- Area of a Triangle using Base and Height
- Angle of a Triangle if two angles are given
- Triangle is Equilateral Isosceles or Scalene
- Use Angles to check Triangle is valid or Not
- Use Sides to check Triangle is Valid or Not
- Area of Rectangle
- Area of a Rectangle using Length and Width
- Perimeter of a Rectangle using Length and Width
- Area of a Trapezoid
- Area of a Right Angled Triangle
- Find Area of an Equilateral Triangle

## Volume and Surface Area Programs in C

Following are the list of Volume and Surface Area programs

- Volume and Surface Area of Sphere
- Volume and Surface Area of a Cylinder
- Find Volume and Surface Area of a Cube
- Volume and Surface Area of a Cuboid
- Volume and Surface Area of a Cone

## Array Programs in C

The following are the c programming examples on Arrays

- Arithmetic Operations on One Dimensional Array
- Count Even and Odd Numbers in an Array
- Count Positive and Negative Numbers in an Array
- Copy an Array to another
- Count Frequency of each Element in an Array
- Count Total Number of Duplicate Elements in an Array
- Delete an Element in an Array
- Delete Duplicate Elements from an Array
- Insert an Element into an Array
- Largest Number in an Array
- Largest and Smallest Number in an Array
- Merge Two Arrays
- Print Elements in an Array
- Put Even and Odd Numbers in two Separate Arrays
- Put Positive and Negative Numbers in two Separate Arrays
- Print Negative Numbers in an Array
- Print Positive Numbers in an Array
- Reverse an Array
- Search for Element in an Array
- Second largest Number in an Array
- Smallest Number in an Array
- Sort Array in Ascending Order
- Sort Array in Descending Order
- Sum of all Elements in an Array
- Sum of Even and Odd Numbers in an Array
- Swap Two Arrays Without Using Temp Variable
- Unique Elements in an Array

## Matrix Programs

- Arithmetic Operations on Multi-Dimensional Arrays
- Add two Matrices
- Check Two Matrices are Equal or Not
- Determinant of a Matrix
- Identity Matrix
- Interchange Diagonals of a Matrix
- Lower Triangle Matrix
- Scalar Multiplication of a Matrix
- Sparse Matrix
- Sum of Diagonal Elements in a Matrix
- Sum of each and every Row and Column in a Matrix
- Summing each row in a Matrix
- Sum of each column in a Matrix
- Subtract Two Matrices
- Sum of Lower Triangle Matrix
- Sum of Opposite Diagonal Elements in a Matrix
- Symmetric Matrix
- Sum of Upper Triangle Matrix
- Transpose a Matrix
- Upper Triangle Matrix

## Sort Programs

## Pointers Programs

## C Programs to print Series

- Fibonacci Series Program
- Find Nth Fibonacci Number
- Sum of series 1²+2²+3²+….+n²
- Sum of series 1³+2³+3³+….+n³
- Find Sum of Geometric Progression Series
- Sum of Arithmetic Progression Series

## C Programs to display Patterns and Shapes

The following are the list of C programs to Print patterns and shapes

- Exponentially Increasing Star Pattern
- Floyd’s Triangle
- Hollow Square Star Pattern
- Hollow Rectangle Star Pattern
- Inverted Right Triangle Star Pattern
- Inverted Pyramid Star Pattern
- Mirrored Right Triangle Star Pattern
- Pascal Triangle
- Rectangle Star Pattern
- Right Angled Triangle Star Pattern
- Reversed Mirrored Right Triangle
- Square Star Pattern
- Star Pyramid Pattern

## C Programming Examples on Number pattern

- Box Number Pattern of 1 and 0’s
- Hollow Box Number Pattern
- Inverted Right Triangle Number Pattern
- Print 1 and 0 in Alternative Rows
- Print 1 and 0 in Alternative Columns
- Right Triangle Number Pattern
- Square Number Pattern

### C Examples on Number Patterns

Following are the remaining number pattern C programming examples.