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
B is the correct answer of which its Double its precision is 15-16 digits compared to Float precision is 7 digits
Shouldnt this be decimal? A double cannot hold decimal values.
C is correct answer
You’re wrong correct answer is B
No, byte is the smallest of all data integer types. only holds 0-255, no decimals. Double is correct under the requirements stated above.
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)