Which of the following is a valid Integer constant: i. 4 ii. 4.0 iii. 4.3f iv. "four"

ICSE Class 10 Computer Applications PYQ · 2024 Specimen · Section A

1(xv)1 Mark · 2024 · Section A · 2024 Specimen

Which of the following is a valid Integer constant:
i. 4
ii. 4.0
iii. 4.3f
iv. "four"

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.

← Previous questionNext question →

Browse the free Computer Applications sample bank