C Exercises

Here are some C Programming exercises to help you hone your skills as a programmer!

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