A switch construct can be used with which of the following types of variable? *
a) int
b) int,chat
c) int,float
d)float
Answers
Answered by
7
Answer:
option B
Explanation:
if it is correct then Mark me as brainliest
Answered by
0
The correct answer is OPTION B: int, char.
- In contrast to the if-then and if-then-else statements, the switch statement can be utilized in a variety of ways.
- Any primitive data type can be utilized with a switch, including int, byte, char, and short.
- Enumerated types, the String class, and a few additional primitive type wrapper classes are available as well: Different forms of data are defined using terms like integer, character, short, and byte.
Similar questions