- A Character
- B Integer
- C Float
- D enum
- Share this MCQ
Answer:
C
Share this MCQ
Answer: Option C
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.
switch( expression ) { case constant-expression1: statements 1; case constant-expression2: statements 2; case constant-expression3: statements3 ; ... ... default : statements 4; }
The value of the 'expression' in a switch-case statement must be an integer, char, short, long. Float and double are not allowed.
Click me to Read more Question & Answer of Inventions MiscellaneousShare this MCQ