Which variable can be used in switch case?

The switch/case statement in the c language is defined by the language specification to use an int value, so you can not use a float value . The value of the ‘expression’ in a switch-case statement must be an integer, char, short, long. Float and double are not allowed.

Sizin İçin Seçtik  Is switch in Java case-sensitive?

Leave a Reply

Your email address will not be published. Required fields are marked *