1.5k views
5 votes
If a value could possibly have a decimal portion, int is the best data type choice?

1) True
2) False

User Ezra Chu
by
8.4k points

1 Answer

3 votes

Final answer:

The best data type choice when a value could possibly have a decimal portion is not int, it is float.

Step-by-step explanation:

The statement is False. If a value could possibly have a decimal portion, the float data type would be a better choice than int. The int data type is used for storing integers, which do not have decimal portions. On the other hand, the float data type is used for storing floating-point numbers that can have decimal portions.

User Artem Skoretskiy
by
8.1k points