C Programming Exercise

The following list provides you C programming problems that you can try for the purpose of learning the C programming language.

C Programming Exercise

  1. Create a program to find Addition, Subtraction, Multiplication, and Division of two numbers
  2. Since the calculation of simple interest is one of the basic programming problems, write code to implement it in C.
  3. Another important programming problem is to determine whether a number is odd or even. Write code in C to do so. 
  4. In general, the length of the three sides of a triangle determines whether it is a valid triangle or not. Develop a program to check if given 3 sides makes a triangle
  5. Since the nature of roots of a quadratic is determined by a specific condition, write program code in C to calculate the roots of a quadratic equation.
  6. Create a program in C to find the factorial of a number.
  7. Develop code in C to print the table of a number.
  8. As shown in the link, create a program to display the given pattern.
  9. Write a program to convert Binary number into decimal
  10. Find Xn using a program written in C.
  11. Develop C Code to display terms of the Fibonacci series and sum them.
  12. Create a program to display a number in reverse order digit-wise.
  13. Find a minimum & maximum of 10 numbers using a C program
  14. Another important application in Computer Science is Searching. Therefore, write a program to search an element using linear search.
  15. Perform sorting of n numbers using Bubble sort in C.
  16. Write a program to search an element using binary search.
  17. Create a program to merge two sorted arrays.
  18. Develop a program to find the Addition of two matrices.
  19. Find the Multiplication of two matrixes using C code.
  20. Write a program to find the transpose of a matrix.
  21. Develop a C program to perform various string operations (strcat,strrev,strlen strcpy,strlwr,strupr).
  22. Create a program to calculate factorial using recursion.
  23. Write code in C to Calculate GCD using recursion.
  24. Create a C program to display mark sheet of n students
  25. Develop a C program to create days of weeks as enumerated data types and display the calendar for a month.
  26. Create a program to implement insertion & deletion operations on a linked list.
  27. Implement insertion & deletion operations on a circular linked list in C language.
  28. Likewise, Implement insertion & deletion operations on a doubly-linked list in C.
  29. Find the addition of two numbers passed using command line arguments in files in C.
  30. Create code using a parameterized macro to calculate the cubic value of a number.
  31. Write code in C to show the working of various standard library functions. (Renaming of file, Maximum between two numbers, Minimum between two numbers, Absolute value of a number)
  32. Develop a program in C to write data in a file and read data from the file.
  33. Create a program in C to write integer data into a file and read it from the file
  34. Demonstrate using a C program how to write command-line arguments in a file.