Make the following changes to the program in Step 2 (simpleTypeDecls2.cpp) and explain the output you get. change the value of “response” to 0 (zero). change the value of “character” to ‘A’

adelen
 (Not rated)
 (Not rated)
Chat

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

      bool response = 234;

      char character = 68;

      int integer = 123.456789;

      float single_precision_number = 1234.567890123456789;

      double double_precision_number = 1234.567890123456789;

      cout<<"response = "<< response <<endl;

      cout<<"character = "<< character <<endl;

      cout<<"integer = "<< integer <<endl;

      cout<<"single_precision_number = "<< setprecision (17)

<<single_precision_number<<endl;

      cout<<"double_precision_number = "<< setprecision (17)

<<double_precision_number<<endl;

      return 0;

}

Question 1:Please explain each line of output.

Question 2:Make the following changes to the program in Step 2 (simpleTypeDecls2.cpp) and

explain the output you get.

change the value of “response” to 0 (zero).

change the value of “character” to ‘A’

    • 11 years ago
    the answer
    NOT RATED

    Purchase the answer to view it

    • the_answer.docx