When entering sales data into a database, you record the total price of items sold. If an item is sold for $19.99, which data type would be most appropriate to use for accuracy?
The correct answer is "Floating-point number" because this data type allows for the representation of non-integer numbers that include a decimal point. In our scenario, $19.99 cannot be accurately represented as an integer since it is not a whole number. Using an integer would result in loss of precision, as it would have to be rounded to either $19 or $20.
The other options are incorrect because "Integer" does not allow for decimal precision, "Boolean" is used for true/false values, and "Character" is typically used for single letters or symbols, not numbers with decimals.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is a floating-point number used for decimal values?
Open an interactive chat with Bash
What is the difference between an integer and a floating-point number?
Open an interactive chat with Bash
When would you use a Boolean or Character data type instead of floating-point numbers?
Open an interactive chat with Bash
CompTIA ITF+ FC0-U61 (V5)
IT Concepts and Terminology
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .