1(xv)
Which of the following is a valid Integer constant:
i. 4
ii. 4.0
iii. 4.3f
iv. "four"
- (a)Only i
- (b)i and iii
- (c)ii and iv
- (d)i and ii
Show SolutionHide Solution↓
Only i
Reason — Integer constants represent whole number values only. Thus, 4 is an integer constant. 4.0 is a double constant, 4.3f is a float constant while "four" is a String constant.