This page contains a list of C programming examples which covers concepts like basic programs on numbers, loops, functions, recursions, etc.
All the C programming examples that are present on this page might contain at least three examples, which include programs using For Loop, using While Loop, methods. In some cases, Recursions.
Simple C Programming Examples
The following C programming examples are the basic and simple programs. And the best way to learn them is by practicing all of the examples. We suggest you understand the logic iteration-wise. So that, you can write your own logic for future examples.
Please visit our C Language section to learn the Programming languages with examples.
- C Program to Print Hello World
- C Program to Add Two Numbers
- C Program To Find the Average of Two Numbers
- C Program to Find the Absolute Value of a Number
- C Program to Find the Compound Interest
- C program to Calculate the Cube of a Number
- C Program to check Number is Even or Odd
- C Program to Print Even Numbers from 1 to N
- C Program to Find Largest of Two Numbers
- C Program to Find Largest of Three Numbers
- C Program to Print Multiplication Table
- C Program to Find the Number is Divisible by 5 and 11
- C Program for nCr Calculation
- C Program for nPr Calculation
- C Program to Print Odd Numbers from 1 to N
- C program to Calculate the Power of a Number
- C program to Find Profit or Loss
- C Program to Print an Integer, Character, and Float Value
- C Program to find the size of int, float, double, and char
- C Program to check Positive or Negative Numbers
- C Program to Print 1 to 100 without using Loop
- C Program to Find the Roots of a Quadratic Equation
- C Program to Calculate the Simple Interest
- C Program to Calculate Standard Deviation
- C Program to Find the Sum of Even and Odd numbers in a Given Range
- C Program to Find the Sum and Average of Three Numbers
- C Program to Find the Square of a Number
- C Program to Find the Square root of a Number
- C Program to Print First 10 Even Natural Numbers
- C Program to Print First 10 Natural Numbers
- C Program to Print First 10 Natural Numbers in Reverse
- C Program to Print First 10 Odd Natural Numbers
- C Program to Read 10 Numbers and Find their Sum and Average
- C Program to Find Sum of 10 Numbers and Skip Negative Numbers
- C Program to Find Sum of 10 Numbers until user enters positive number
- C Program to Find the Sum of Even Numbers from 1 to n
- C Program to Find the Sum of Odd Numbers from 1 to n
- C Program to Find the Student Grade
- C Program to Find the Total, Average, and Percentage of Five Subjects
- C Program to Multiply Two Floating Point Numbers
- C Program to Find the Quotient and Remainder
- C Program to accept User Input and Print
- C Program to Perform the Arithmetic Operations using Functions
- C Program to Find the Range of Data Types
- C Program to Find the Distance Between Two Points
C Advanced Number Programs
The list of advanced Number programs in C Programming language with multiple examples.
- C Program to Check the Armstrong Number
- C Program to Count Number of Digits in a Number
- C program to Check Number is a Prime, Armstrong, or Perfect Number
- C program to Calculate Electricity Bill
- C Program to find Factors of a Number
- C Program to Find the Factorial of a Given Number
- C Program to Find the First Digit of Number
- C Program to Print the First and Last Digit of a Number
- C Program to Calculate GCD of Two Numbers
- C Program to Calculate Generic Root of a Number
- C Program to Find the Gross Salary of an Employee
- C Program to Print the Last Digit of Number
- C Program to Calculate LCM of Two Numbers
- C Program to Find theNCR Factorial of a Number
- C Program to Print Natural Numbers from 1 to N
- C Program to Print Natural Numbers in Reverse Order
- C Program to Check Krishnamurthy Number
- C Program to Check Neon Number
- C Program to Check Palindrome Number
- C Program to Check Perfect Number or Not
- C Program to Check Prime Number
- C Program to Print Prime Numbers from 1 to 100
- C Program to Calculate Product of Digits of a Number
- C Program to Find the Prime Factors of a Number
- C Program to Reverse a Number
- C program to Reverse a Number using Recursive Function
- C Program to Swap Two Numbers
- C Program to Find the Sum of First and Last Digit of a Number
- C Program to Swap First and Last Digit of a Number
- C Program to Find the Sum of N Natural Numbers
- C Program to Find the Sum and Average of N Numbers
- C Program to Check Strong Number
- C Program to Find the Sum of Digits in a Given Number
- C Program to Create a Simple Calculator
- C Program to Find the Total Notes in a Given Amount
- C Program to Print Floyds Triangle
- C Program to Print Pascal Triangle
Programs on Calendar
- C Programs to find the Leap Year
- C Program to Find the Day Name of a Week
- C Program to Convert Days to Years Weeks and Days
- C Program to Find the Number of Days in a Month
C Programs on Conversions
The following are the list of programs to Convert
- Convert Binary to Decimal
- Convert Binary to Octal
- C example 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
- Octal to Binary
- Octal to Decimal
Programs on Characters
Below programs are the Programs to Check whether the Character is
- C Program to Find the ASCII Value of Single Character
- C Program to Find the ASCII Values of all Characters
- C Program to Check Character is an Alphabet or Not
- C Program to Check Character is an Alphabet or Digit
- C Program to Convert Character to Uppercase
- C Program to Convert Character to Lowercase
- C Program to Check Character is a Digit or Not
- C Program to Check Character is a Digit or Alphabet or Special Character
- C Program to Check Character is a Lowercase or Not
- C Program to Check Character is a Lowercase or Uppercase Alphabet
- C Program to Print Alphabets from a to z
- C Program to Print Alphabets between A and Z
- C Program to Check Character is Uppercase or Not
- C Program to Check Character is Vowel or Consonant
C String Programs
The list of programs on strings or character arrays.
- C programming language to find the ASCII Value of Total Characters in a String
- C Program to Find All Occurrence of a Character in a String
- C Program to Print Characters in a String
- C Program to Read Input and Print String
- C Program to Compare two Strings
- C Program to Concatenate Two Strings
- C Program to Copy a 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
- C Program to Find the Length of a String
- C Program to Convert Lowercase to Uppercase
- C Program to Find the Maximum Occurring Character in a string
- C Program to Find the Minimum Occurring Character in a String
- C Program to Find the 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
- Remove All Characters in a String Except Alphabets
- 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 a String using Recursion
- Reverse Order of Words in a String
- Toggle Case of all Characters in a String
- Uppercase to Lowercase
- C Program to Remove White Spaces from a String
- C program to Sort Names in Alphabetical Order
C Programming Examples on Area
The following are the list of programs on Area.
- 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 an Isosceles Triangle
- Area of Rectangle
- Area of a Rectangle using Length and Width
- Perimeter of a Rectangle using Length and Width
- Area of a Parallelogram
- Area of a Trapezoid
- Area of a Right Angled Triangle
- Find Area of an Equilateral Triangle
- Area of a Rhombus
- Perimeter of a Rhombus
- C Program to Find the Area of a Semicircle
- C Program to Find the Perimeter of a Square
Volume and Surface Area Programs
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
C Programs on Arrays
The following are the list of most common Array programs.
- C Program to Perform Arithmetic Operations on One Dimensional Array
- C Program to find the Number of Elements in an Array
- C Program to Count Even and Odd Numbers in an Array
- C Program to Count Positive and Negative Numbers in an Array
- C Program to Copy an Array to another
- C Program to Find the Average of an Array
- C Program to Count Occurrence of an Element in an Array
- C Program to Count Frequency of each Element in an Array
- C Program to Count Total Number of Duplicate Elements in an Array
- C Program to Delete an Element in an Array
- C Program to Delete Duplicate Elements from an Array
- C Program to Insert an Element into an Array
- C Program to Find the Largest Number in an Array
- C Program to Find the Largest and Smallest Number in an Array
- C Program to Find the Length or Size of an Array
- C Program to Merge Two Arrays
- C Program to Print Elements in an Array
- C Program to Put Even and Odd Numbers in two Separate Arrays
- C Program to Put Positive and Negative Numbers in two Separate Arrays
- C Program to Print Negative Numbers in an Array
- C Program to Print Positive Numbers in an Array
- C Program to Reverse an Array
- C Program to Search for Element in an Array
- C Program to Find the Second largest Number in an Array
- C Program to Find the Smallest Number in an Array
- C Program to Find the Second Smallest Element in an Array
- C Program to Sort Array in Ascending Order
- C Program to Sort Array in Descending Order
- C Program to Find the Sum of all Elements in an Array
- C Program to Find the Sum of Even and Odd Numbers in an Array
- C Program to Swap Two Arrays Without Using Temp Variable
- C Program to Find the Unique Elements in an Array
- C Program to Increment All Elements of an Array by One
- C Program to Print the Kth Element in an Array
- C Program to Left Rotate Array Items
- C Program to Right Rotate Array Elements
- C Program to Find Array Elements Greater than Average
- C Program to Print 2D Array Elements
C Programs on Matrix
- C Program to Perform the Arithmetic Operations on Multi-Dimensional Arrays
- C Program to Add two Matrices
- C Program to Check Two Matrices are Equal or Not
- C Program to Find the Determinant of a Matrix
- C Program to Find the Identity Matrix
- C Program to Interchange Diagonals of a Matrix
- C Program to Print the Lower Triangle Matrix
- C Program to Perform Scalar Matrix Multiplication
- C Program to Check a Sparse Matrix
- C Program to Find the Sum of Diagonal Elements in a Matrix
- C Program to Find the Sum of each and every Row and Column in a Matrix
- C Program to Find the Sum of each row in a Matrix
- C Program to Find the Sum of each column in a Matrix
- C Program to Subtract Two Matrices
- C Program to Find the Sum of Lower Triangle Matrix
- C Program to Find the Sum of Opposite Diagonal Elements in a Matrix
- C Program to Check a Symmetric Matrix
- C Program to Find the Sum of Upper Triangle Matrix
- C Program to Transpose a Matrix
- C Program to Print Upper Triangle Matrix
- C Program to Find the Normal of a Matrix
- C Program to Find the Trace of a Matrix
C Programs – Sort Examples
- C Program for Bubble Sort
- C Program for Quick Sort
- C Program for Insertion Sort
- C Program for Selection Sort
Program on Pointers
- C Program to Add Two Numbers using Pointers
- C Program to Create, Initialize, and Access a Pointer Variable
- C Program to Count Vowels and Consonants in a String using a Pointer
- C Program to Find the Largest of Two Numbers using a Pointer
- C Program to Find the Largest of Three Numbers using a Pointer
- C Program to Pass Pointers as the Function Arguments
- C Program to Print String using Pointer
- C Program to Read and Print Array Elements using a Pointer
- C Program to Sort an Array using a Pointer
- C Program to Find the Sum and Average of Array Elements using a Pointer
- C Program to Swap Two Numbers using Pointer
C Programs to print Series
- C Program to Find the Fibonacci Series, Nth Number and the Sum of it
- C Program to Find the Sum of series 1²+2²+3²+….+n²
- C Program to Find the Sum of series 1³+2³+3³+….+n³
- C Program to Find the Sum of Geometric Progression Series
- C Program to Find the Sum of Arithmetic Progression Series
Display Patterns and Shapes
The following are the list of C programs to Print patterns and shapes.
Comments are closed.