I was working on review question 20 and came across this scenario.
According to the book, " the values in each case statement must be compile-time constant values of the same data type as the switch value" .
Though the switch value type is 'char' and the statement 'case 1' below has value type of int, the program is compiling without any errors. I was expecting it to give a compile error when it encounters case 1.
What am i missing? TIA !