CompTIA ITF+ (FC0-U61) — Question 106
A global variable called `age` will be created in a program and incremented through the use of a function. Which of the following data types should be defined with the age variable?
Answer options
- A. Integer
- B. Float
- C. Double
- D. String
Correct answer: A
Explanation
The correct choice is Integer since age is typically represented as a whole number. Float and Double are not suitable because they are used for decimal values, while String is inappropriate as it represents text rather than numerical data.