Top 100 C Programs for Practice

Top 100 C Programs

This page lists the top 100 C programs every beginner and intermediate developer should practice. They cover:

  • Basic input/output operations
  • Control flow (if, switch, loops)
  • Functions and recursion
  • Arrays, strings, and matrices
  • Pattern printing
  • Pointers and structures
  • Mathematical and logical problems

Each program helps you master C programming concepts and improve your logical thinking. Explore the full list below and click on each program to view its explanation and source code.

  1. C Hello World Program
  2. C Program - Print Your Own Name
  3. C Program - Print an Integer Entered By the User
  4. C Program - Add Two Numbers
  5. C Program - Check Whether a Number is Prime or Not
  6. C Program - Multiply two Floating-Point Numbers
  7. C Program - Print the ASCII Value of a Character
  8. C Program - Swap Two Numbers
  9. C Program - Calculate Fahrenheit to Celsius
  10. C Program - Find the Size of int, float, double, and char
  11. C Program - Add Two Complex Numbers
  12. C Program - Print Prime Numbers From 1 to N
  13. C Program - Find Simple Interest
  14. C Program - Find Compound Interest
  15. C Program - Area And Perimeter Of Rectangle
  16. C Program - Check Whether a Number is Positive, Negative, or Zero
  17. C Program - Check Whether Number is Even or Odd
  18. C Program - Check Whether a Character is Vowel or Consonant
  19. C Program - Find Largest Number Among Three Numbers
  20. C Program - Calculate Sum of Natural Numbers
  21. C Program - Print Alphabets From A to Z Using Loop
  22. C Program - Check Leap Year
  23. C Program - Find Factorial of a Number
  24. C Program - Make a Simple Calculator
  25. C Program - Generate Multiplication Table
  26. C Program - Print Fibonacci Series
  27. C Program - Find LCM of Two Numbers
  28. C Program - Check Armstrong Number
  29. C Program - Display Armstrong Numbers Between 1 to 1000
  30. C Program - Display Armstrong Number Between Two Intervals
  31. C Program - Reverse a Number
  32. C Program - Check Whether a Number is a Palindrome or Not
  33. C Program - Display Prime Numbers Between Intervals
  34. C Program - Check whether the input number is a Neon Number
  35. C Program - Find All Factors of a Natural Number
  36. C Program - Print Simple Pyramid Pattern
  37. C Program - Print Given Triangle
  38. C Program - Print 180 0 Rotation of Simple Pyramid
  39. C Program - Print Inverted Pyramid
  40. C Program - Print Number Pattern
  41. C Program - Print Character Pattern
  42. C Program - Print Hollow Star Pyramid
  43. C Program - Print Pascal's Pattern Triangle Pyramid
  44. C Program - Print Floyd's Pattern Triangle Pyramid
  45. C Program - Check Prime Number By Creating a Function
  46. C Program - Display Prime Numbers Between Two Intervals Using Functions
  47. C Program - Find All Roots of a Quadratic Equation
  48. C Program - Check Whether a Number can be Express as Sum of Two Prime Numbers
  49. C Program - Find the Sum of Natural Numbers using Recursion
  50. C Program - Calculate the Factorial of a Number Using Recursion
  51. C Program - Find G.C.D Using Recursion
  52. C Program - Calculate Power Using Recursion
  53. C Program - Print a 2D Array
  54. C Program - Find the Largest Element in an Array
  55. C Program - Find the Maximum and Minimum in an Array
  56. C Program - Search an Element in an Array (Binary search)
  57. C Program - Calculate the Average of All the Elements Present in an Array
  58. C Program - Sort an Array using Bubble Sort
  59. C Program - Sort an Array using Merge Sort
  60. C Program - Sort an Array Using Selection Sort
  61. C Program - Sort an Array Using Insertion Sort
  62. C Program - Sort the Elements of an Array in Descending Order
  63. C Program - Sort the Elements of an Array in Ascending Order
  64. C Program - Remove Duplicate Elements From a Sorted Array
  65. C Program - Merge Two Arrays
  66. C Program - Find Common Array Elements
  67. C Program - Copy All the Elements of One Array to Another Array
  68. C Program - Array Rotation
  69. C Program - Sort the 2D Array Across Rows
  70. C Program - Check Whether Two Matrices Are Equal or Not
  71. C Program - Find the Transpose
  72. C Program - Find the Determinant of a Matrix
  73. C Program - Find the Normal and Trace
  74. C Program - Add Two Matrices
  75. C Program - Multiply Two Matrices
  76. C Program - Print Boundary Elements of a Matrix
  77. C Program - Rotate Matrix Elements
  78. C Program - Compute the Sum of Diagonals of a Matrix
  79. C Program - Interchange Elements of First and Last in a Matrix Across Rows
  80. C Program - Add or Concatenate Two Strings
  81. C Program - Add 2 Binary Strings
  82. C Program - Get a Non-Repeating Character From the Given String
  83. C Program - Check if the string is palindrome or not
  84. C Program - Reverse an Array or String
  85. C Program - Reverse a String Using Recursion
  86. C Program - Find the Length of a String
  87. C Program - Sort a String
  88. C Program - Check For Pangram String
  89. C Program - Print the First Letter of Each Word
  90. C Program - Remove Leading Zeros
  91. C Program - Compute Quotient and Remainder
  92. C Program - Demonstrate the Working of Keyword long
  93. C Program - Check Whether a Character is an Alphabet or not
  94. C Program - Count Number of Digits in an Integer
  95. C Program - Calculate the Power of a Number
  96. C Program - Reverse a Sentence Using Recursion
  97. C Program - Calculate Standard Deviation
  98. C Program - Multiply two Matrices by Passing Matrix to a Function
  99. C Program - Swap Numbers in Cyclic Order Using Call by Reference
  100. C Program - Remove all Characters in a String Except Alphabets
Sai Kishore Randhi, author
About the author

Sai Kishore Randhi

Embedded systems, VLSI, and chip design

Sai Kishore writes about embedded systems, VLSI, chip design, and the programming concepts behind modern hardware.

View LinkedIn profile ↗