54.1k views
0 votes
"The data type that can hold decimal or fractional values is:"

A. String
B. int
C. float
D. boolean

User MewX
by
6.3k points

1 Answer

7 votes

Final answer:

The data type suitable for holding decimal or fractional values is 'C. float'. The float data type allows storage of numbers that require representation of fractions or decimal points.

Step-by-step explanation:

The data type that can hold decimal or fractional values is C. float. In programming, different data types allow us to store different forms of information. For instance, a String is used for text, an int is used for integers (whole numbers), a boolean holds true or false values, and a float is used for numbers that require fractions or decimal points. It's important to choose the correct type for the data you need to store; if a precise measurement is needed, and it includes a decimal, then float is the way to go.

User Isaac Pak
by
7.4k points