1. Engineering
  2. Computer Science
  3. 11 5 show precisely the output of the following c...

Question: 11 5 show precisely the output of the following c...

Question details

11. (5) Show precisely the output of the following C++ program. Use a small b with a slash through it to indicate a blank. #include iostream> #include ion a nip> using namespace std; int main O char ch A; int n 413; float v 21.8 cout < ch; cout <ch < endl; cout <<setw(5) << n << “ is the value of n << endl; cout << setw(7) << y << “ is the value of y.. << endl; return 0; 2. (5) Given that x is a float variable containing 14.3827, show the output of each statement below. Use a blank with a slash through it to indicate a blank. (Assume that cout << fixed has already been executed.) a. cout << “x is” << setw(5) << setprecision(2) < x << endl; b. cout << “x is << setw(8) << setprecision(2) << x << endl; c. cout << “x is” << setw(0) << setprecision(2) << x << endl; d. cout << “x is << setw(3) << setprecision(3) <<x << endl; e. cout << X is” << setprecision(3) << x << endl;

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution