Question: 1) What will display: double num1, num2; char bar = '|'; int num3; num1 = 6; num2 = 7.564; num3 =12; cout < < fixed
1) What will display:
double num1, num2;
char bar = '|';
int num3;
num1 = 6;
num2 = 7.564;
num3 =12;
cout << fixed << setprecision(2);
cout << bar << setw(5) << num1 << bar << setw(5)<< num2 << bar << setw(5) << num3 << bar;
1. | 6.00| 7.56|12.00|
2. | 6.00| 7.56| 12|
3. bar 6.00 bar 7.56 bar 12.00
4. | 6.00|7.564| 12|
5. None of these, setw(5) needs to be in quotes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
