C- Floating Point Issues MCQ Questions and Answers
Practice ModeShowing 10 of 28 questions
Q11
What is the term for the error that occurs when a number cannot be represented exactly in floating-point format?
Answer: Option B
Explanation: Rounding error occurs when a value is approximated to the nearest representable floating-point number.
Q12
In IEEE 754 single-precision floating-point, how many bits are allocated for the exponent?
Answer: Option B
Explanation: IEEE 754 single-precision uses 8 bits for exponent, 23 bits for mantissa, and 1 bit for sign.
Q13
Which of the following operations is most likely to amplify floating-point errors?
Answer: Option C
Explanation: Subtracting nearly equal numbers can lead to catastrophic cancellation and significant error amplification.
Q14
What is "catastrophic cancellation" in floating-point arithmetic?
Answer: Option C
Explanation: Catastrophic cancellation occurs when significant digits are lost during subtraction of nearly equal numbers.
Q15
Which decimal value is most likely to cause representation issues in binary floating-point?
Answer: Option C
Explanation: 0.1 has a repeating binary representation, making it impossible to represent exactly in finite binary.
Q16
What is the purpose of the "guard digit" in floating-point operations?
Answer: Option C
Explanation: Guard digits provide extra precision during intermediate calculations to reduce rounding errors.
Q17
In IEEE 754 double-precision, how many bits are used for the mantissa?
Answer: Option B
Explanation: Double-precision uses 52 bits for mantissa, 11 bits for exponent, and 1 sign bit.
Q18
What is "denormalized numbers" in IEEE 754 standard?
Answer: Option C
Explanation: Denormalized numbers allow representation of values smaller than the smallest normalized number.
Q19
Which of these comparisons might give unexpected results due to floating-point precision?
Answer: Option B
Explanation: 0.1 + 0.2 != 0.3 due to cumulative representation errors of 0.1 and 0.2 in binary.
Q20
What is "NaN" in floating-point arithmetic?
Answer: Option A
Explanation: NaN (Not a Number) represents undefined or unrepresentable results in floating-point calculations.