The best way to learn C programming is by practicing examples. The page contains examples on basic concepts of C programming. You are advised to take the references from these examples and try them on your own.

All the programs on this page are tested and should work on all platforms.

Want to learn C Programming by writing code yourself? Enroll in our Interactive C Course for FREE.

  1. C "Hello, World!" Program
  2. C Program to Print an Integer (Entered by the User)
  3. C Program to Add Two Integers
  4. C Program to Multiply Two Floating-Point Numbers
  5. C Program to Find ASCII Value of a Character
  6. C Program to Compute Quotient and Remainder
  7. C Program to Find the Size of int, float, double and char
  8. C Program to Demonstrate the Working of Keyword long
  9. C Program to Swap Two Numbers
  10. C Program to Check Whether a Number is Even or Odd
  11. C Program to Check Whether a Character is a Vowel or Consonant
  12. C Program to Find the Largest Number Among Three Numbers
  13. C Program to Find the Roots of a Quadratic Equation
  14. C Program to Check Leap Year
  15. C Program to Check Whether a Number is Positive or Negative
  16. C Program to Check Whether a Character is an Alphabet or not
  17. C Program to Calculate the Sum of Natural Numbers
  18. C Program to Find Factorial of a Number
  19. C Program to Generate Multiplication Table
  20. C Program to Display Fibonacci Sequence
  21. C Program to Find GCD of two Numbers
  22. C Program to Find LCM of two Numbers
  23. C Program to Display Characters from A to Z Using Loop
  24. C Program to Count Number of Digits in an Integer
  25. C Program to Reverse a Number
  26. C Program to Calculate the Power of a Number
  27. C Program to Check Whether a Number is Palindrome or Not
  28. C Program to Check Whether a Number is Prime or Not
  29. C Program to Display Prime Numbers Between Two Intervals
  30. C Program to Check Armstrong Number
  31. C Program to Display Armstrong Number Between Two Intervals
  32. C Program to Display Factors of a Number
  33. C Program to Make a Simple Calculator Using switch...case
  34. C Program to Display Prime Numbers Between Intervals Using Function
  35. C Program to Check Prime or Armstrong Number Using User-defined Function
  36. C Program to Check Whether a Number can be Expressed as Sum of Two Prime Numbers
  37. C Program to Find the Sum of Natural Numbers using Recursion
  38. C Program to Find Factorial of a Number Using Recursion
  39. C Program to Find G.C.D Using Recursion
  40. C Program to Convert Binary Number to Decimal and vice-versa
  41. C Program to Convert Octal Number to Decimal and vice-versa
  42. C Program to Convert Binary Number to Octal and vice-versa
  43. C Program to Reverse a Sentence Using Recursion
  44. C program to calculate the power using recursion
  45. C Program to Calculate Average Using Arrays
  46. C Program to Find Largest Element in an Array
  47. C Program to Calculate Standard Deviation
  48. C Program to Add Two Matrices Using Multi-dimensional Arrays
  49. C Program to Multiply Two Matrices Using Multi-dimensional Arrays
  50. C Program to Find Transpose of a Matrix
  51. C Program to Multiply two Matrices by Passing Matrix to a Function
  52. C Program to Access Array Elements Using Pointer
  53. C Program Swap Numbers in Cyclic Order Using Call by Reference
  54. C Program to Find Largest Number Using Dynamic Memory Allocation
  55. C Program to Find the Frequency of Characters in a String
  56. C Program to Count the Number of Vowels, Consonants and so on
  57. C Program to Remove all Characters in a String Except Alphabets
  58. C Program to Find the Length of a String
  59. C Program to Concatenate Two Strings
  60. C Program to Copy String Without Using strcpy()
  61. C Program to Sort Elements in Lexicographical Order (Dictionary Order)
  62. C Program to Store Information of a Student Using Structure
  63. C Program to Add Two Distances (in inch-feet system) using Structures
  64. C Program to Add Two Complex Numbers by Passing Structure to a Function
  65. C Program to Calculate Difference Between Two Time Periods
  66. C Program to Store Information of Students Using Structure
  67. C Program to Store Data in Structures Dynamically
  68. C Program to Write a Sentence to a File
  69. C Program to Read the First Line From a File
  70. C Program to Display its own Source Code as Output
  71. C Program to Print Pyramids and Patterns