Switch case is a conditional control statement that allows us to make decisions from number of available choices. It uses an integer value or an enumeration type value for making decisions.
Here is a set of basic programming problems based on switch case to practice.
- Write a C program to print day of week name using switch case.
- Write a C program print total number of days in a month using switch case.
- Write a C program to check whether an alphabet is vowel or consonant using switch case.
- Write a C program to find maximum between two numbers using switch case.
- Write a C program to check whether a number is even or odd using switch case.
- Write a C program to find roots of a quadratic equation using switch case.
- Write a C program to create Simple Calculator using switch case.
You may also like
- Basic programming exercises and solutions in C.
- Bitwise operator programming exercises and solutions in C.
- If else programming exercises and solutions in C.
- Conditional operator programming exercises and solutions in C.
- Loop programming exercises and solutions in C.
- Array and Matrix programming exercises and solutions in C.
- String programming exercises and solutions in C.
- Function and recursion programming exercises and solutions in C.