Which of the following sets of statements will set floating point output to the stream outStream to fixed point with set 3 places of decimals? In the explanation, you must give any necessary #include directives and using directives or declarations.

a) ```
outStream.setf(ios::fixed);
outStream.setf(ios::showpoint);
outStream.precision(2);
```

b) ```
outStream.setf(ios::fixed | ios::showpoint);
outStream << setprecision(2);
```

c) ```
outStream << setflag(ios::fixed);
outStream << setflag(ios::showpoint);
outStream << setprecision(2);
```

d)
```
outStream.flags(ios::fixed);
outStream.flags(ios::showpoint);
outStream.precision(2);
```


a) ```
outStream.setf(ios::fixed);
outStream.setf(ios::showpoint);
outStream.precision(2);
```

and

b) ```
outStream.setf(ios::fixed | ios::showpoint);
outStream << setprecision(2);
```

c) is an incorrect use of manipulators and non-manipulators. d) is a misuse of the flags member function.

Computer Science & Information Technology

You might also like to view...

Types in Java are divided into two categories— __________ types and _____________ types.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The Windows 8 operating system supports ________ devices

Fill in the blank(s) with correct word

Computer Science & Information Technology

A(n) ________ is miniature view of a slide that is displayed in the Slides pane

A) icon B) logo C) thumbnail D) emblem

Computer Science & Information Technology

In contrast to a centralized system, a client/server design separates applications and data.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology