0
494views
State true or false with reason

a. A float constant cannot be used as a case constant in a switch statement.

b. While(0); is an infinite loop.

1 Answer
0
3views

a. A float constant cannot be used as a case constant in a switch statement.
True
- The data in the computer is stored in the form of bits either 0 or 1.
- Float no's are stored differently in the computer.
- If the no is 0.2 So in binary 0.2 is equivalent to 0011001100110011......
- These float no's are approximate and not the exact no's but switch needs exact values to compare so float cannot be used as a case constant.

b. While(0); is an infinite loop.
False
The control will never enter the loop. There will be no infinite loop condition

Please log in to add an answer.