Multiple choice

Which manipulator is used to specify the required field size for displaying an output value?

  1. setfill()

  2. setprecision()

  3. setw()

  4. setiosflags()

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The setw() manipulator (set width) is used to set the field width for the next output operation.