asked 141k views
5 votes
Which data type should you use to store a person's age?

A) String
B) Integer
C) Float
D) Boolean

asked
User Lawton
by
8.0k points

1 Answer

3 votes

Final answer:

Use the Integer data type to store a person's age.

Step-by-step explanation:

To store a person's age, the appropriate data type to use is Integer.

An Integer data type is used to represent whole numbers without any fractional part. Since a person's age is typically represented by a whole number, such as 25 or 42, an Integer data type is the most suitable choice.

Using an Integer data type ensures that the age can be easily used in calculations or comparisons, without any unexpected results or precision issues.

answered
User Ndrw
by
7.6k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.