Answer:
Following are the Switch statement in C language is given below:
switch (grade) //switch case
{
case 'A': // case A
++acount; // incremented of acount
break; // break the switch case
case 'B': // case B
++bcount; // incremented of bcount
break; // break the switch case
case 'C': // case C
++ccount; // incremented of ccount
break; // break the switch case
case 'D': //case D
++dcount; // incremented of dcount
break; // break the switch case
case 'E': //case E
++ecount; // incremented of ecount
break; // break the switch case
case 'F': // case F
++fcount; // incremented of fcount
break; // break the switch case
case 'W': // case W
++wcount;// increment of wcount
break; // break the switch case
case 'I': // Case
icount++; // increment of icount variable
break; // break the switch case
default: // default case
printf(" incorrect letter");/
}
Explanation:
The switch is used when we have multiple conditions and we have chosen only one condition.
The description of the statement is given below