C Programming All Topics Exercises
Basic programs with examples
- Add Two Integers with C.
- Swap Values of Two Variables with C.
- Multiply two Floating Point Numbers with C.
- Perform all arithmetic operations with C.
- Convert feet to meters with C.
- Convert celcius to farenheit with C.
- Convert farenheit to celcius with C.
- Find the Size of data types with C.
- Print ASCII Value with C.
- Calculate the Area of the Circle with C.
- Calculate the Area of the Square with C.
- Calculate the Area of the Rectangle with C.
- Convert days to years, weeks, and days with C.
Conditional programs exercises and Solutions:-
- Find the maximum between two numbers with C language.
- Find a maximum between three numbers with C language.
- Check whether a number is negative, positive, or zero with C language.
- Check whether a number is divisible by 3 and 7 or not with C language.
- Check whether a number is even or odd with C language.
- Check whether a year is a leap year or not with C language.
- Check whether a character is an alphabet or not with C language.
- Input any alphabet and check whether it is a vowel or consonant with C language.
- Input any character and check whether it is the alphabet, digit, or special character with C language.
- Check whether a character is an uppercase or lowercase alphabet with C language.
- Input the week number and print the weekday with C language.
- Input the month number and print the number of days in that month in C language.
- Count the total number of notes in a given amount with C language.
- Input angles of a triangle and check whether a triangle is valid or not with C language.
- Check whether the triangle is an equilateral, isosceles, or scalene triangle with C language.
- Calculate the total marks, percentage, and division of students with C language.
Loop programs exercises and Solutions:-
- print all natural numbers from 1 to n. with using a while loop with C
- print all natural numbers in reverse (from n to 1). using while loop with C
- print all alphabets from a to z. using while loop with C
- print all even numbers between 1 to 100. with using while loop with C
- print all odd numbers between 1 to 100 with C.
- find the sum of all natural numbers between 1 to n with C.
- find the sum of all even numbers between a to b with C.
- find the sum of all odd numbers between 1 to n with C.
- print a multiplication table of any number with C.
- count the number of digits in a number with C.
- find the first and last digits of a number with C.
- find the sum of the first and last digits of a number with C.
- swap the first and last digits of a number with C.
- calculate the sum of digits of a number with C.
- calculate the product of digits of a number with C.
- enter a number and print its reverse with C.
- check whether a number is a palindrome or not with C.
- find the frequency of each digit in a given integer with C.
- enter a number and print it in words with C.
- find the power of a number using for loop with C.
- find all factors of a number with C.
- calculate the factorial of a number with C.
- find the HCF (GCD) of two numbers with C.
- find the LCM of two numbers with C.
- check whether a number is a Prime number or not with C.
- Print all Prime numbers between 1 to n with C.
- Find the sum of all prime numbers between first to last with C.
- Find all prime factors of a number with C.
- Check whether a number is an Armstrong number or not with C.
- Print all Armstrong numbers between 1 to n with C.
- Check whether a number is a Perfect number or not with C.
- Print all Perfect numbers between 1 to n with C.
- Check whether a number is a Strong number or not with C.
- Print all Strong numbers between 1 to n with C.
- Print Fibonacci series up to n terms with C.
- Find one's complement of a binary number with C.
- Find two's complement of a binary number with C.
- Convert Binary to Decimal number system with C.
- Convert Decimal to Binary number system with C.
Array programs exercises and Solutions:-
----------------------------------- 1D Array --------------------------------
- Read and print elements of the array with C.
- Print all negative elements in an array with C.
- Find the sum of all array elements with C.
- Find the maximum and minimum elements in an array. - using recursion with C.
- Find the second largest element in an array with C.
- Count the total number of even and odd elements in an array with C.
- Count the total number of negative elements in an array with C.
- Copy all elements from an array to another array with C.
- Insert an element in an array with C.
- Delete an element from an array at a specified position with C.
- Count the frequency of each element in an array with C.
- Print all unique elements in the array with C.
- Count the total number of duplicate elements in an array with C.
- Delete all duplicate elements from an array with C.
- Merge two arrays to a third array with C.
- Find the reverse of an array with C.
- Search an element in an array with C.
- Sort array elements in ascending or descending order with C.
----------------------------------- 2D Array --------------------------------
- Add two matrices with C.
- Subtract two matrices with C.
- Perform Scalar matrix multiplication with C.
- Multiply two matrices with C.
- Check whether two matrices are equal or not with C.
- Find the sum of the main diagonal elements of a matrix with C.
- Find the sum of each row and column of a matrix with C.
- Find the transpose of a matrix with C.
- Find the determinant of a matrix with C.
- Check the Identity matrix with C.
- Check the Sparse matrix with C.
- Check the Symmetric matrix with C.
String programs exercises and Solutions:-
- Find the length of a string with C.
- Copy one string to another string with C.
- Concatenate two strings with C.
- Compare two strings with C.
- Convert lowercase string to uppercase with C.
- Convert uppercase string to lowercase with C.
- Toggle the case of each character of a string with C.
- Find the total number of alphabets, digits, or special characters in a string with C.
- Count the total number of vowels and consonants in a string with C.
- Count the total number of words in a string with C.
- Find the reverse of a string with C.
- Check whether a string is a palindrome or not with C.
- Find the first occurrence of a character in a given string with C.
- Find the last occurrence of a character in a given string with C.
- Search all occurrences of a character in a given string with C.
- Count occurrences of a character in a given string with C.
- Find the highest frequency character in a string with C.
- Find the lowest frequency character in a string with C.
- Count the frequency of each character in a string with C.
- Remove the first occurrence of a character from the string with C.
- Remove the last occurrence of a character from the string with C.
- Remove all occurrences of a character from a string with C.
- Remove all repeated characters from a given string with C.
- Replace the first occurrence of a character with another in a string with C.
- Find the first occurrence of a word in a given string with C.
- Find the last occurrence of a word in a given string with C.
- Search all occurrences of a word in a given string with C.
Pointer programs exercises and Solutions:-
- Create, initialize and use pointers with C.
- Add two numbers using pointers with C.
- Swap two numbers using pointers with C.
- Input and print array elements using a pointer with C.
function programs exercises and Solutions:-
- Find the cube of any number using the function.
- Find the diameter, circumference, and area of the circle using functions.
- Find the maximum and minimum between two numbers using functions.
- Check whether a number is even or odd using functions.
- Find all prime numbers between given intervals using functions.
- Print all Armstrong numbers between given intervals using functions.
- Print all perfect numbers between given intervals using functions
0 Comments