Answer:
A switch statement is a set of different outputs depending on the number of criteria asked to follow.
Given an integer number as a variable status, the algorithm would state as the following:
int num
switch (num) {
case 200:
printf(OK);
break;
case 403:
printf(Fobidden);
break;
case 404:
printf(Not Found);
break;
case 500:
printf(Server Error);
break;
default:
printf(Not a proper value);
break;
}
Depends on the value of hte variable "num", it will fall in one of the options above. If the variable has a different value that doesn't fit in any of the options above, it will prompt the default message.