Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ Here are some variables and outputs. Tell and describe what code could be us

ID: 673298 • Letter: C

Question

C++

Here are some variables and outputs. Tell and describe what code could be used to produce the output given. Most are cout statements with library function calls, stream manipulators, etc., but all are results derived from the given variable (some may have more than one way to produce the given output). You can assume all necessary header files have been included. These will be used as a recap to the first three chapters as we are almost to the midterm point. Post your answers to a couple of them, reply to others, add to others posts, etc. You must make at least three posts and they should add to the discussion. Please tell the number and copy the problem you are posting about, so other students will know what the question is. I will add some posts by the end of the week to clarify answers if necessary. I added a partial answer post to number 5.

1. char e = 'D';

output:  
d    false


2. float b = 5, c = 3;
   
output:
125.00


3. char A[4] = "HOT";

output:
3


4. char s = 't';

output:
116


5. int x = 47;

output:
****+47

6. float y = 318.8239;

output:
3.19e+002


7. bool z = 0;

output:
1

Explanation / Answer

if(e == 'E')
cout << "True";
else
cout << "False";

cout << pow(b,c);

cout << strlen(A);

cout << (int)s;

cout << "****+"<<x;

cout << y;

if(!z)
cout << 1;
else
cout << 0;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote