Conditional Instructions Practice Questions (C Programming)
Easy (21 questions):
1. Write a program to check whether a number is positive, negative or zero.
2. Write a program to check if a number is even or odd.
3. Write a program to find the largest of two numbers.
4. Write a program to check whether a character is a vowel or consonant.
5. Write a program to find the smallest of three numbers.
6. Write a program to check if a year is a leap year.
7. Write a program to check if a student has passed or failed based on marks.
8. Write a program to check if a number is divisible by 5 and 11.
9. Write a program to check if a number is multiple of 3 or 7.
10. Write a program to find the grade of a student based on marks.
11. Write a program to check if a character is uppercase or lowercase.
12. Write a program to find the biggest of three numbers using else-if ladder.
13. Write a program to check if a number is a three-digit number.
14. Write a program to check if a number is a prime number.
15. Write a program to check if a character is an alphabet, digit or special
character.
16. Write a program to check whether a given number is positive or negative.
17. Write a program to print day of the week using switch case.
18. Write a program to find the number of days in a month using switch case.
19. Write a program to print a month name using switch case.
20. Write a program to implement calculator operations using switch case.
21. Write a program to check if a number is even or odd using switch case.
Medium (15 questions):
1. Write a program to check if a year is a leap year or not using nested if.
2. Write a program to find the roots of a quadratic equation using if-else.
3. Write a program to calculate income tax based on income slabs.
4. Write a program to display the name of the month based on the month number using
switch.
5. Write a program to check pass or fail for multiple subject marks.
6. Write a program to find the maximum of four numbers using nested if-else.
7. Write a program to check for vowel or consonant using switch case.
8. Write a program to find the day type (weekday/weekend) using switch case.
9. Write a program to find the category of age group (child, adult, senior).
10. Write a program to determine if a character is uppercase, lowercase or digit
using if-else.
11. Write a program to calculate electricity bill based on unit consumption slabs.
12. Write a program to convert digit to word using switch case.
13. Write a program to calculate the discount based on quantity purchased.
14. Write a program to find the largest digit in a number.
15. Write a program to check eligibility to vote based on age and citizenship.
Hard (10 questions):
1. Write a program to find the day of year for a given date.
2. Write a program to check if a number is Armstrong or not using conditionals.
3. Write a program to find the type of triangle (equilateral, isosceles, scalene).
4. Write a program to find the roots of cubic equation using if-else.
5. Write a program to validate an IP address format.
6. Write a program to find if three sides can form a triangle or not.
7. Write a program to check the quadrant of a point in Cartesian plane.
8. Write a program to calculate BMI and classify the category.
9. Write a program to check eligibility for multiple conditions (loan approval).
10. Write a program to find the next date given a date.
Hard_core (4 questions):
1. Write a program to simulate a basic ATM transaction menu using switch case.
2. Write a program to implement a mini billing system using nested if-else and
switch.
3. Write a program to implement a text-based game menu with multiple switch case
conditions.
4. Write a program to validate complex password rules using if-else conditionals.