MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the range of floating point number in C?
A
1.7 e-38 to 1.7 e +38
B
3.4 e-38 to 3.4 e +38
C
1.7 e-308 to 1.7 e +308
D
3.4 e-308 to 3.4 e +308
Explanation: 

Detailed explanation-1: -float: Range is from 3.4E-38 to 3.4E38 (positive or negative), with 7 significant digits of precision. double: Range is from 1.7E-308 to 1.7E308 (positive or negative), with 15 significant digits of precision. They also include 0. mEe is computer notation for m times 10 to the e power.

Detailed explanation-2: -3.4E38 means 3.4x10^38 and corresponding to that 3.4E-38 means 3.4x10^-38. So any value above this limit will be out of range.

Detailed explanation-3: -A single-precision, floating-point number is a 32-bit approximation of a real number. The number can be zero or can range from-3.40282347E+38 to-1.17549435E-38, or from 1.17549435E-38 to 3.40282347E+38.

Detailed explanation-4: -This representation gives a range of approximately 3.4E-38 to 3.4E+38 for type float. You can declare variables as float or double, depending on the needs of your application.

Detailed explanation-5: -A “floating-point constant” is a decimal number that represents a signed real number. The representation of a signed real number includes an integer portion, a fractional portion, and an exponent. Use floating-point constants to represent floating-point values that can’t be changed.

There is 1 question to complete.