written 5.7 years ago by | • modified 3.0 years ago |
a. A float constant cannot be used as a case constant in a switch statement.
b. While(0); is an infinite loop.
written 5.7 years ago by | • modified 3.0 years ago |
a. A float constant cannot be used as a case constant in a switch statement.
b. While(0); is an infinite loop.
written 3.0 years ago by |
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