LearnFrenzy
Sign in Take a free test

Input/Output with cin and cout · Input/Output MCQ · Question 8

Which header provides setw and setprecision? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 8 Back to Exercise

Which header declares std::setw, std::setfill and std::setprecision?

  • A <iostream>
  • B <iomanip> Correct
  • C <format>
  • D <cstdio>
Correct Answer: Option B

Manipulators that take arguments are in <iomanip>. Argument-less ones such as std::fixed, std::hex and std::endl come with <iostream>.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links