PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

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

6 Comments on “Which data type should you use?

  1. DB7 says:

    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)




    0



    0

Leave a Reply