Which data type should you use?

You are creating the necessary variables for an application. The data you will store in these
variables has the following characteristics:
Consists of numbers
Includes numbers that have decimal points
Requires more than seven digits of precision
You need to use a data type that will minimize the amount of memory that is used.
Which data type should you use?

You are creating the necessary variables for an application. The data you will store in these
variables has the following characteristics:
Consists of numbers
Includes numbers that have decimal points
Requires more than seven digits of precision
You need to use a data type that will minimize the amount of memory that is used.
Which data type should you use?

A.
decimal

B.
double

C.
byte

D.
float

Explanation:
The double keyword signifies a simple type that stores 64-bit floating-point values.
Precision: 15-16 digits
Incorrect:
Not D: The float keyword signifies a simple type that stores 32-bit floating-point values.
Precision: 7 digits



Leave a Reply 6

Your email address will not be published. Required fields are marked *


mandisa

mandisa

B is the correct answer of which its Double its precision is 15-16 digits compared to Float precision is 7 digits

M_Blaster

M_Blaster

Shouldnt this be decimal? A double cannot hold decimal values.

_anonoymous

_anonoymous

C is correct answer

Fredy

Fredy

You’re wrong correct answer is B

DB7

DB7

No, byte is the smallest of all data integer types. only holds 0-255, no decimals. Double is correct under the requirements stated above.

DB7

DB7

B: Double, accepts more than 7 decimal points, requires less memory than Decimal
Float is too small, accepts maximum of 7 decimal points
Decimal is too big, or overkill (You need to use a data type that will minimize the amount of memory that is used)