Variable of float data type cannot be passed as an expression in switch case.
Agree with Aarti. Just to add non-integral values can't be used with case.
Switch-Case statement should have variable which are from int family only like int, uint, long int, long unsigned int, short int, short unsigned int, char, signed char and enum.
What is not allowed: array (any type), float or float family (double)
As I could guess that switch case should be avoided in C can someone explain in detail when not to use switch case statement?