What should be the type of choices in the CASE statement?

Thanh Hoan

New member
What should be the type of choices in the CASE statement?
A. Boolean
B. Integer
C. Same as expression
D. No restriction on the type
 
Answer: c
Explanation: It is necessary that the type of choices in the CASE statement is same as the type of expression in the same. For example, any expression is of type integer, and then all the choices must be of the type integer.
 

Tìm kiếm

Back
Top