Switch case programming exercises and solutions in C

Previous Exercise Next Exercise

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.

  1. Write a C program to print day of week name using switch case.
  2. Write a C program print total number of days in a month using switch case.
  3. Write a C program to check whether an alphabet is vowel or consonant using switch case.
  4. Write a C program to find maximum between two numbers using switch case.
  5. Write a C program to check whether a number is even or odd using switch case.
  6. Write a C program to find roots of a quadratic equation using switch case.
  7. Write a C program to create Simple Calculator using switch case.

You may also like

Previous Exercise Next Exercise
Any doubt or suggestion write here. I will try my best to help. Before posting your code you must escape it to view. To format your source code and use format highlighting, post your source code inside
< pre>< code >----Your Source Code---- < / code > < / pre > (Remove spaces from pre and code tags)

No comments:

Post a Comment