Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started