SOOPRO Pathshala provides topic-wise C programming exercises covering basic programs, data types, operators, conditional statements, loops, arrays, functions, pointers, strings, recursion, structures, unions, memory management and file handling.
Practice Instructions:
Read each question carefully and write and run the C program. Mark a topic complete after finishing its exercises. Your progress is saved in this browser.
Write a program to find maximum between two numbers using conditional operator.
Write a program to find maximum between three numbers using conditional operator.
Write a program to check whether a number is even or odd using conditional operator.
Write a program to check whether a number is even or odd using conditional operator.
Write a program to check whether year is leap year or not using conditional operator.
Write a program to check whether character is an alphabet or not using conditional operator.
Program to Check Whether a Character is Vowel or Consonant using Conditional operator
Program to Check Character is Alphabet, Digit or Special Character using Conditional operator
program to check whether a character is Uppercase or Lowercase using Conditional operator
Program to find smallest among three numbers using Conditional operator
Program to check whether the given integer is positive,negative or zero using Conditional operator
Program to print largest of two numbers using conditional operator
Program to print smallest of two numbers using conditional operator
Program to print largest of three numbers using conditional operator
Program to print smallest of three numbers using conditional operator
Program to print enter number is even number or odd number using conditional operator
Program to print check leap year or common year using Conditional operator
Program to check alphabet or no alphabet using conditional operator
Program to check alphabet or no alphabet using ASCII value and conditional operator
Program to check vowel or consonant using conditional operator
Program to check vowel or consonant using ASCII value and conditional operator
Program to check alphabet, digit or special symbal using conditional operator
Program to check alphabet, digit or special symbal using ASCII value and conditional operator
Program to check enter alphabet is upper case or lower case using conditional operator
Program to check enter alphabet is upper case or lower case using ASCII value and conditional operator
Program to check the given integer is positive,negative or zero using and conditional operator
Program to check enter week number and print day of week using conditional operator
Program to check print number of days in month using conditional operator
Program to check print number of days in month using or operator and conditional operator
Program to check print number of days in month and month name using conditional operator
Program to check print check triangle validity when angles are given using conditional operator.
Program to check valid triangle when sides are given using logical AND operator and conditional operator
Program to check isosceles,scalene or equilateral triangle when sides are given using conditional operator
Program to check calculate profit or loss using conditional operator
Program to enter student marks and find percentage and grade using conditional operator
Write a program to add 8 to the number 2345 and then divide it by 3. Now, the modulus of the quotient is taken with 5 and then multiply the resultant value by 5. Display the final result.
Write a program to check if the two numbers 24 and 45 are equal.
Write a program to print the power of 7 raised to 5.
The total number of students in a class are 90 out of which 45 are boys. If 50% of the total students secured grade 'A' out of which 20 are boys, then write a program to calculate the total number of girls getting grade 'A'.
Write a program to calculate the sum of the digits of a 3-digit number.
Write a program to reverse a 3-digit number
Check if the string "apple" is equal to the string "banana" using the equality operator. Print the result.
Write a program to get a number from the user and print whether it is positive or negative.
Write a program that takes three numbers from the user and prints the greatest number.
Write a program that takes a number from the user and generates an integer between 1 and 7. It displays the weekday name.
Write a program that reads two floating-point numbers and tests whether they are the same up to three decimal places.
Write a program to find the number of days in a month.
Write a program that takes a year from the user and prints whether it is a leap year or not.
Write a program to check even or odd number.
Write a program to print valid to vote if age greater than or equal to 18 else print not valid to vote.
Write a program to print maximum among two integer numbers.
Write a program to print square of maximum and cube of minimum number.
Write a program to print diff of max and min among three numbers.
Write a program to print grade of student marks.
Write a program to print both are equal no, if two numbers are equal else print not equal.
Write a program to print 1 if two integer numbers are same, else print 0.
Write a program to print smallest among three numbers.
Write a program to print addition of two numbers on choice 1, subtraction of two numbers on choice 2, multiplication of two numbers on choice3 and division of two numbers on choice 4.
Write a program to print area of circle on choice 1, area of rectangle on choice 2, area of traingle on choice 3, invalid choice on choice 4.
Write a program to print sum of square and cube of any even number.
Write a program to print diff of square and cube of any odd number.
Write a program to print product of square and cube of even number
Write a program to print sum of 1 to 10 using for loop.
Write a program to print square of 1 to 10 using for loop.
Write a program to print cube of 1 to 10 using for loop.
Write a program to print even sum and odd sum of 1 to 10.
write a program to print table of any number using for loop.
Write a program to calculate the sum of first 10 natural number.
Write a program that prompts the user to input a positive integer. It should then print the multiplication table of that number.
Write a program to find the factorial value of any number entered through the keyboard.
Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.
Write a program that prompts the user to input an integer and then outputs the number with the digits reversed. For example, if the input is 12345, the output should be 54321.
Write a program that reads a set of integers, and then prints the sum of the even and odd integers.
Write a program that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number.
Write a program to calculate HCF of Two given number.
Write a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again. If so, the loop should repeat; otherwise it should terminate.
Write a program to enter the numbers till the user wants and at the end it should display the count of positive, negative and zeros entered.
Write a program to enter the numbers till the user wants and at the end the program should display the largest and smallest numbers entered.
Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number.
Write a program to print Fibonacci series of n terms where n is input by user :
Write a program to calculate the sum of following series where n is input by user. 1 + 1/2 + 1/3 + 1/4 + 1/5 +…………1/n
Write a program to print prime numbers between 2 to 50.
Write a program to print not prime numbers between 2 to 10.
Write a program to print your name ten times using while loop.
Write a program to print vowels and consonants of your first name.
Write a program to print vowels in left side and consonants in right side.
Write a program to print square of all odd numbers of 1 to 10.
Write a program to print cube of all even numbers of 1 to 10.
Write a program to print average of 1 to 10.
Write a program to print sum of table of any number.
Write a program to print sum of table of 1 to 5.
Write a program to print table of only even numbers between 5 to 20.
Write a program to print table of only odd numbers between 2 to 20.
Write a program to print total table sum between 1 to 10.
Write a program to print all even numbers between 2 to 50 in left side and all odd numbers in right side.
Write a program to print reverse of any three digit numbers.
Write a program to print sum of first and last number of any four digit numbers.
Write a program to print subtract of first and last number of any five digit numbers.
Write a program to print product of max and min of any four digit numbers.
Write a program to check whether given number is palindrome or not.
Write a program to check armstrong number.
Write a program to print table of max of and factorial of min of any five digit numbers.
Write a program to print sum of max and min and average of all three digit numbers.
Write a program to print following : * ** *** **** *****
Write a program to print table of any number in horizontal form.
Write a program to print square of all odd numbers in vertical form
Write a program to print factorial of 1 to 5.
Write a program to print factorial sum of all odd numbers between 1 to 10.
Write a program to print prime sum of odd even numbers between 5 to 50.