Conditional programs exercises and Solutions:-

  1. Find the maximum between two numbers with C language.
  2. Find a maximum between three numbers with C language.
  3. Check whether a number is negative, positive, or zero with C language.
  4. Check whether a number is divisible by 3 and 7 or not with C language.
  5. Check whether a number is even or odd with C language.
  6. Check whether a year is a leap year or not with C language.
  7. Check whether a character is an alphabet or not with C language.
  8. Input any alphabet and check whether it is a vowel or consonant with C language.
  9. Input any character and check whether it is the alphabet, digit, or special character with C language.
  10. Check whether a character is an uppercase or lowercase alphabet with C language.
  11. Input the week number and print the weekday with C language.
  12. Input the month number and print the number of days in that month in C language.
  13. Count the total number of notes in a given amount with C language.
  14. Input angles of a triangle and check whether a triangle is valid or not with C language.
  15. Check whether the triangle is an equilateral, isosceles, or scalene triangle with C language.
  16. Calculate the total marks, percentage, and division of students with C language.

Loop programs exercises and Solutions:-

  1. print all natural numbers from 1 to n. with using a while loop  with C
  2. print all natural numbers in reverse (from n to 1). using while loop with C
  3. print all alphabets from a to z. using while loop with C
  4. print all even numbers between 1 to 100. with using while loop with C
  5. print all odd numbers between 1 to 100 with C.
  6. find the sum of all natural numbers between 1 to n with C.
  7. find the sum of all even numbers between a to b with C.
  8. find the sum of all odd numbers between 1 to n with C.
  9. print a multiplication table of any number with C.
  10. count the number of digits in a number with C.
  11. find the first and last digits of a number with C.
  12. find the sum of the first and last digits of a number with C.
  13. swap the first and last digits of a number with C.
  14. calculate the sum of digits of a number with C.
  15. calculate the product of digits of a number with C.
  16. enter a number and print its reverse with C.
  17. check whether a number is a palindrome or not with C.
  18. find the frequency of each digit in a given integer with C.
  19. enter a number and print it in words with C.
  20. find the power of a number using for loop with C.
  21. find all factors of a number with C.
  22. calculate the factorial of a number with C.
  23. find the HCF (GCD) of two numbers with C.
  24. find the LCM of two numbers with C.
  25. check whether a number is a Prime number or not with C.
  26. Print all Prime numbers between 1 to n with C.
  27. Find the sum of all prime numbers between first to last with C.
  28. Find all prime factors of a number with C.
  29. Check whether a number is an Armstrong number or not with C.
  30. Print all Armstrong numbers between 1 to n with C.
  31. Check whether a number is a Perfect number or not with C.
  32. Print all Perfect numbers between 1 to n with C.
  33. Check whether a number is a Strong number or not with C.
  34. Print all Strong numbers between 1 to n with C.
  35. Print Fibonacci series up to n terms with C.
  36. Find one's complement of a binary number with C.
  37. Find two's complement of a binary number with C.
  38. Convert Binary to Decimal number system with C.
  39. Convert Decimal to Binary number system with C.

Array programs exercises and Solutions:-

            ----------------------------------- 1D Array  --------------------------------

  1. Read and print elements of the array with C.
  2. Print all negative elements in an array with C.
  3. Find the sum of all array elements with C.
  4. Find the maximum and minimum elements in an array. - using recursion with C.
  5. Find the second largest element in an array with C.
  6. Count the total number of even and odd elements in an array with C.
  7. Count the total number of negative elements in an array with C.
  8. Copy all elements from an array to another array with C.
  9. Insert an element in an array with C.
  10. Delete an element from an array at a specified position with C.
  11. Count the frequency of each element in an array with C.
  12. Print all unique elements in the array with C.
  13. Count the total number of duplicate elements in an array with C.
  14. Delete all duplicate elements from an array with C.
  15. Merge two arrays to a third array with C.
  16. Find the reverse of an array with C.
  17. Search an element in an array with C.
  18. Sort array elements in ascending or descending order with C.

                   ----------------------------------- 2D Array  --------------------------------

  1. Add two matrices with C.
  2. Subtract two matrices with C.
  3. Perform Scalar matrix multiplication with C.
  4. Multiply two matrices with C.
  5. Check whether two matrices are equal or not with C.
  6. Find the sum of the main diagonal elements of a matrix with C.
  7. Find the sum of each row and column of a matrix with C.
  8. Find the transpose of a matrix with C.
  9. Find the determinant of a matrix with C.
  10. Check the Identity matrix with C.
  11. Check the Sparse matrix with C.
  12. Check the Symmetric matrix with C.

String programs exercises and Solutions:-


  1. Find the length of a string with C.
  2. Copy one string to another string with C.
  3. Concatenate two strings with C.
  4. Compare two strings with C.
  5. Convert lowercase string to uppercase with C.
  6. Convert uppercase string to lowercase with C.
  7. Toggle the case of each character of a string with C.
  8. Find the total number of alphabets, digits, or special characters in a string with C.
  9. Count the total number of vowels and consonants in a string with C.
  10. Count the total number of words in a string with C.
  11. Find the reverse of a string with C.
  12. Check whether a string is a palindrome or not with C.
  13. Find the first occurrence of a character in a given string with C.
  14. Find the last occurrence of a character in a given string with C.
  15. Search all occurrences of a character in a given string with C.
  16. Count occurrences of a character in a given string with C.
  17. Find the highest frequency character in a string with C.
  18. Find the lowest frequency character in a string with C.
  19. Count the frequency of each character in a string with C.
  20. Remove the first occurrence of a character from the string with C.
  21. Remove the last occurrence of a character from the string with C.
  22. Remove all occurrences of a character from a string with C.
  23. Remove all repeated characters from a given string with C.
  24. Replace the first occurrence of a character with another in a string with C.
  25. Find the first occurrence of a word in a given string with C.
  26. Find the last occurrence of a word in a given string with C.
  27. Search all occurrences of a word in a given string with C.

Pointer programs exercises and Solutions:-

  1. Create, initialize and use pointers with C.
  2. Add two numbers using pointers with C.
  3. Swap two numbers using pointers with C.
  4. Input and print array elements using a pointer with C.

function programs exercises and Solutions:-


File Handling exercises and Solutions:-

Star programs exercises and Solutions:-