CompTIA Data+ (DA0-001) — Question 204
Which of the following is the best variable format to store a customer's age using the least possible amount of storage data?
Answer options
- A. Int
- B. Float
- C. Char
- D. Double
Correct answer: A
Explanation
The correct answer is 'Int' because it is an integer data type that requires the least amount of storage for whole numbers, such as age. 'Float' and 'Double' are used for decimal values and consume more memory, while 'Char' is meant for single characters and is not suitable for numerical data.