Which manipulator(s) can be used to precisely control the number of decimal point showing in mantissa of a floating point number?
Group of answer choices
1. Only lone application of fixed will do it
2. Setprecision by itself without prior application of fixed
3. fixed followed by setprecision
4. setw
Question: Which manipulator(s) can be used to precisely control the number of decimal point showing in mantissa of a floating point number?
Answer: 3. fixed followed by setprecision
Explanation:
Option 3: Setprecision when used along with ‘fixed’ provides precision to floating point numbers correct to decimal numbers mentioned in the brackets of the setprecison.
Incorrect answers:
Option 1: Only lone application of fixed won't provide precision to floating point numbers correct to decimal numbers
Option 2: Setprecision by itself without prior application of fixed won't provide precision to floating point numbers correct to decimal numbers
Option 4: setw won't provide precision to floating point numbers correct to decimal numbers
Hope this answers your questions, please leave a upvote if you find this helpful.
Get Answers For Free
Most questions answered within 1 hours.