Here if i run the code every case is getting printed and it is not happening if i put the default at the end can you please give me a clarification why it is happening so? Thank u so much in advance for spending time at my question.
enter code here
#include <stdio.h>
int main()
{
int weekday=8;
switch (weekday)
{
default:
printf("\n Please enter Valid Number between 1 to 7");
case 1:
printf("\n Today is Monday");
case 2:
printf("\n Today is Tuesday");
case 3:
printf("\n Today is Wednesday");
case 4:
printf("\n Today is Thursday");
case 5:
printf("\n Today is Friday");
case 6:
printf("\n Today is Saturday");
case 7:
printf("\n Today is Sunday");
}
printf("\n%d",weekday);
return 0;
}