Tutorial Gateway

  • C
  • C#
  • Python
  • SQL
  • Java
  • JS
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs
  • MySQL

C Programming Examples

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.

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.

Please visit our C Language section to learn C Programming with examples

  1. C Program to Print Hello World
  2. C Program to Add Two Numbers
  3. C Program to Find Average of Two Numbers
  4. C program to find the Compound Interest
  5. C program to Calculate the Cube of a Number
  6. C Program to check the Number is Even or Odd
  7. C Program to Print Even Numbers from 1 to N
  8. C Program to find the Largest of Two Numbers
  9. C Program to find the Largest of Three Numbers
  10. Multiplication Table
  11. Number is Divisible by 5 and 11
  12. nCr Calculation
  13. nPr Calculation
  14. Odd Numbers from 1 to N
  15. Print an Integer, Character, and Float Value
  16. Positive or Negative Number
  17. Power of a Number
  18. Print 1 to 100 without using Loop
  19. Profit or Loss
  20. Roots of a Quadratic Equation
  21. Simple Interest
  22. Standard Deviation
  23. Sum of Even and Odd numbers in a Given Range
  24. Square of a Number
  25. Square root of a Number
  26. Sum of Even Numbers from 1 to n
  27. Sum of Odd Numbers from 1 to n
  28. Student Grade
  29. Total, Average, and Percentage of Five Subjects
  30. C example to accept User Input and Print

C Programming Examples on Numbers

The list of advanced Number programs in C Programming language with multiple examples.

  1. C Program to check the Number is Armstrong Number
  2. C program to Count Number of Digits in a Number
  3. C program to Check Number is a Prime, Armstrong, or Perfect Number
  4. C program to Calculate Electricity BillC
  5. C Program to find Factors of a Number
  6. C Program to find Factorial of a Given Number
  7. First Digit of Number
  8. First and Last Digit of a Number
  9. GCD of Two Numbers
  10. Generic Root of a Number
  11. Gross Salary of an Employee
  12. Last Digit of Number
  13. LCM of Two Numbers
  14. NCR Factorial of a Number
  15. Natural Numbers from 1 to N
  16. Natural Numbers in Reverse Order
  17. Palindrome or Not
  18. Perfect Number or Not
  19. Prime Number
  20. Prime Numbers from 1 to 100
  21. Product of Digits of a Number
  22. Prime Factors of a Number
  23. Reverse a Number
  24. Swap Two Numbers
  25. Sum of First and Last Digit of a Number
  26. Swap First and Last Digit of a Number
  27. Sum of N Natural Numbers
  28. Sum and Average of N Numbers
  29. Strong Number
  30. Sum of Digits in a Given Number
  31. Simple Calculator
  32. Total Notes in a Given Amount

Calendar Programs in C

  1. C Program to find the Leap Year
  2. C example to find the Day Name of a Week
  3. Days to Years Weeks and Days
  4. Number of Days in a Month

Conversion Programs in C

The following are the list of C programs to Convert

  1. C Program to Convert Binary to Decimal
  2. C example to Convert Centimeter to Meter and Kilometer
  3. Celsius to Fahrenheit
  4. Decimal to Binary Number
  5. Decimal to Octal Number
  6. Fahrenheit to Celsius
  7. Kilometer to Meter Centimeter and Millimeter

C Programs on Characters

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

  1. C Program to find the ASCII Value of Single Character
  2. C example to find ASCII Values of all Characters
  3. Alphabet or Not
  4. Alphabet or Digit
  5. Convert Character to Uppercase
  6. Convert Character to Lowercase
  7. Digit or Not
  8. Digit or Alphabet or Special Character
  9. Lowercase or Not
  10. Lowercase or Uppercase Alphabet
  11. Print Alphabets from a to z
  12. Print Alphabets between A and Z
  13. Uppercase or Not
  14. Vowel or Consonant

C Programming Examples on String

  1. C Program to find the ASCII Value of Total Characters in a String
  2. C example to find All Occurrence of a Character in a String
  3. C programming example to find Characters in a String
  4. Compare two Strings
  5. Concatenate Two Strings
  6. Copy String
  7. Count Alphabets, Digits and Special Characters in a String
  8. Count Vowels, and Consonants in a String
  9. Counting All Occurrence of a Character in a String
  10. Count Total Number of Words in a String
  11. Frequency of each Character in a String
  12. First Occurrence of a Character in a String
  13. First Occurrence of a Word in a String
  14. Last Occurrence of a Character in a String
  15. Length of a String
  16. Lowercase to Uppercase
  17. Maximum Occurring Character in a string
  18. Minimum Occurring Character in a String
  19. Palindrome String
  20. Remove First Occurrence of a Character in a String
  21. Remove Last Occurrence of a Character in a String
  22. Removing All Occurrences of a Character in a String
  23. Remove All Duplicate Characters in a String
  24. Replace First Occurrence of a Character in a String
  25. Replace Last Occurrence of a Character in a String
  26. Replacing All Occurrence of a Character in a String
  27. Reverse a String
  28. Reverse Order of Words in a String
  29. Toggle Case of all Characters in a String
  30. Uppercase to Lowercase

C Programming Examples on Area

The following are the list of Area programs in C language

  1. C Program to Find the Area of a Circle
  2. Diameter, Circumference, and Area of a Circle
  3. Area of a Triangle
  4. Area of a Triangle using Base and Height
  5. Angle of a Triangle if two angles are given
  6. Triangle is Equilateral Isosceles or Scalene
  7. Use Angles to check Triangle is valid or Not
  8. Use Sides to check Triangle is Valid or Not
  9. Area of an Isosceles Triangle
  10. Area of Rectangle
  11. Area of a Rectangle using Length and Width
  12. Perimeter of a Rectangle using Length and Width
  13. Area of a Parallelogram
  14. Area of a Trapezoid
  15. Area of a Right Angled Triangle
  16. Find Area of an Equilateral Triangle
  17. Area of a Rhombus
  18. Perimeter of a Rhombus

Volume and Surface Area Programs in C

Following are the list of Volume and Surface Area programs

  1. Volume and Surface Area of Sphere
  2. Volume and Surface Area of a Cylinder
  3. Find Volume and Surface Area of a Cube
  4. Volume and Surface Area of a Cuboid
  5. Volume and Surface Area of a Cone

Array Programs in C

The following are the c programming examples on Arrays

  1. C Program to Perform Arithmetic Operations on One Dimensional Array
  2. C example to Count Even and Odd Numbers in an Array
  3. C example Count Positive and Negative Numbers in an Array
  4. C example to Copy an Array to another
  5. Count Frequency of each Element in an Array
  6. Count Total Number of Duplicate Elements in an Array
  7. Delete an Element in an Array
  8. Delete Duplicate Elements from an Array
  9. Insert an Element into an Array
  10. Largest Number in an Array
  11. Largest and Smallest Number in an Array
  12. Length or Size of an Array
  13. Merge Two Arrays
  14. Print Elements in an Array
  15. Put Even and Odd Numbers in two Separate Arrays
  16. Put Positive and Negative Numbers in two Separate Arrays
  17. Print Negative Numbers in an Array
  18. Print Positive Numbers in an Array
  19. Reverse an Array
  20. Search for Element in an Array
  21. Second largest Number in an Array
  22. Smallest Number in an Array
  23. Sort Array in Ascending Order
  24. Sort Array in Descending Order
  25. Sum of all Elements in an Array
  26. Sum of Even and Odd Numbers in an Array
  27. Swap Two Arrays Without Using Temp Variable
  28. Unique Elements in an Array

Matrix Programs

  1. C Program to Perform Arithmetic Operations on Multi-Dimensional Arrays
  2. C example to add two Matrices
  3. C example to Check Two Matrices are Equal or Not
  4. C example to Determinant of a Matrix
  5. Identity Matrix
  6. Interchange Diagonals of a Matrix
  7. Lower Triangle Matrix
  8. Scalar Multiplication of a Matrix
  9. Sparse Matrix
  10. Sum of Diagonal Elements in a Matrix
  11. Sum of each and every Row and Column in a Matrix
  12. Summing each row in a Matrix
  13. Sum of each column in a Matrix
  14. Subtract Two Matrices
  15. Sum of Lower Triangle Matrix
  16. Sum of Opposite Diagonal Elements in a Matrix
  17. Symmetric Matrix
  18. Sum of Upper Triangle Matrix
  19. Transpose a Matrix
  20. Upper Triangle Matrix

C Sort Examples

  1. Bubble Sort
  2. Quick Sort
  3. Insertion Sort
  4. Selection Sort

Pointers Programs

  1. Add Two Numbers using Pointers
  2. Pass Pointers as the Function Arguments

C Programs to print Series

  1. Fibonacci Series Program
  2. Find Nth Fibonacci Number
  3. Sum of series 1²+2²+3²+….+n²
  4. Sum of series 1³+2³+3³+….+n³
  5. Find Sum of Geometric Progression Series
  6. 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

  1. C Example to print exponentially Increasing Star Pattern
  2. C example to Print Floyd’s Triangle
  3. C example to Print Diamond Star Pattern
  4. C example to Print Half Diamond Star Pattern
  5. C example to Print Mirrored Half Diamond Star Pattern
  6. C example to Print Left Arrow Star Pattern
  7. C example to Print Pascal Triangle
  8. C example to Print Pyramid Star Pattern
  9. C example to Print Hollow Pyramid Star
  10. C example to Print Inverted Pyramid Star Pattern
  11. C example to Print Hollow Inverted Star Pyramid
  12. Plus Star Pattern
  13. Rectangle Star Pattern
  14. Hollow Rectangle Star Pattern
  15. Right Arrow Star Pattern
  16. Right Angled Triangle Star Pattern
  17. Hollow Right Triangle Star Pattern
  18. Reversed Mirrored Right Triangle
  19. Mirrored Right Triangle Star Pattern
  20. Hollow Mirrored Right Triangle Star Pattern
  21. Inverted Right Triangle Star Pattern
  22. Hollow Inverted Right Triangle Star Pattern
  23. Inverted Mirrored Right Triangle Star Pattern
  24. Hollow Inverted Mirrored Right Triangle Star Pattern
  25. Rhombus Star Pattern
  26. Hollow Rhombus Star Pattern
  27. Mirrored Rhombus Star Pattern
  28. Hollow Mirrored Rhombus Star Pattern
  29. Square Star Pattern
  30. Hollow Square Star Pattern
  31. Hollow Square Pattern With Diagonals
  32. X Star Pattern

C Programming Examples on Number pattern

  1. C example to Print the Box Number Pattern of 1 and 0’s
  2. C example to Print Hollow Box Number Pattern
  3. C example to Print Inverted Right Triangle Number Pattern
  4. C example to Print 1 and 0 in Alternative Rows
  5. Print 1 and 0 in Alternative Columns
  6. C example to Print Right Triangle Number Pattern
  7. C example to Print Square Number Pattern

C Examples on Number Patterns

Following are the remaining number pattern C programming examples.

C program to Print Number Pattern 1
C program to Print Number Pattern 2
C program to Print Number Pattern 5
C program to Print Box Number Pattern of 1 and 0
C program to Print Number Pattern 3
C program to Print Number Pattern 6
C program to Print Hollow Box Number Pattern
C program to Print Number Pattern 4
C program to Print Number Pattern 7

  • SQL DML, DDL, DCL & TCL Cmds
  • SQL NOT EXISTS Operator
  • SQL UPDATE from SELECT
  • SQL AFTER UPDATE Triggers
  • SQL Get Column Names in Table
  • SQL IF ELSE
  • SQL ACID Properties
  • SQL FOR XML PATH
  • Java Two Dimensional Array
  • Java Perfect Number Program
  • Java Count Digits in a Number
  • C Compare Two Strings Program
  • C Print Prime Numbers 1 to 100
  • C program to Reverse a String
  • C Palindrome Number Program
  • C Program for Palindrome String
  • C Remove Duplicate String Chars
  • C Square of a Number Program
  • C Sum and Average of N Number
  • Python Fibonacci Series program
  • Python Area Of Circle Program
  • Python Prime Numbers 1 to 100
  • Python Program for Leap Year
  • Tableau Rank Calculation
  • Tableau Google Maps usage
  • Power BI Format Dates
  • Power BI Top 10 Filters
  • Power BI – Create Hierarchy
  • Power BI DAX Math Functions
  • SSIS Transformations
  • SSIS Incremental Load
  • SSRS Drill Through Reports
  • SSRS Drill Down Reports
  • R Programming Tutorial

Copyright © 2021· All Rights Reserved by Suresh.
About | Contact | Privacy Policy