What will be the output of the following C prog...

What will be the output of the following C program segment?

Char inChar = 'A';

switch(inChar)
{
case 'A': printf("Happy\t");
case 'B': 
case 'C': printf("New\t");
case 'D':
case 'E':
default: printf("Year 2018\t");

}

Happy

Happy New

Happy New Year 2018

Year 2018

Hint: 

There is no break statement in the respective cases for the switch statement.

0Comment