ExamGecko
Question list
Search
Search

Question 216 - FC0-U61 discussion

Report
Export

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?

A.
Boolean
Answers
A.
Boolean
B.
Integer
Answers
B.
Integer
C.
Float
Answers
C.
Float
D.
Char
Answers
D.
Char
Suggested 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

asked 02/10/2024
Hoang Son
47 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first