Which of the following BEST explains the use of float over integer to store monetary values?
A.
It accepts negative values.
B.
It stores symbols
C.
It accommodates larger values.
D.
It supports decimals.
The Answer Is:
D
This question includes an explanation.
Explanation:
Float is a data type that can store decimal or fractional numbers, such as 3.14, 0.5, or -2.75. Float would be the best data type to use for storing monetary values because monetary values often involve decimals, such as $1.99, 0.25,or-5.50. Integer is a data type that can only store whole numbers, such as 1, 0, or -2. Integer would not be suitable for storing monetary values that have decimals. The other options are not data types that can store numerical values. References: CompTIA IT Fundamentals+ Study Guide: Exam FC0-U61, Second Edition, Chapter 4: Programming Concepts and Data Structures, page 146.
FC0-U61 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"