A developer is writing a script to calculate a bank account balance within two decimal places. Which of the following data types should the developer select to store the balance?
Correct Answer: C
Explanation
A float is a data type that can store decimal numbers, such as 3.14 or 0.01. This is suitable for calculating a bank account balance within two decimal places, as it can represent fractions of a dollar. A boolean is a data type that can only store true or false values, which is not useful for numerical calculations. An integer is a data type that can store whole numbers, such as 1 or 100, but not decimals. A char is a data type that can store a single character, such as 'a' or '9', but not multiple characters or decimals. References: CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61, Second Edition, Chapter 4: Software Development Concepts, page 1371