Question: What are outputs produced by the following code segments? Show all spaces, newlines, and tabs if any are present in the output. a. double num

What are outputs produced by the following code segments? Show all spaces, newlines, and tabs if any are present in the output.

a.

double num = 75;

if (num > 90\

cout << setw(15) << "Excellent";

}

else if (num > 60

cout << setw(15) << "Pass";

}

else if (num > 70{

cout << setw(15) << "Good";

else {

cout << setw(15) << "Fail";

}

cout < setprecision(2) << fixed; cout setw(7) < num < endl;

b.

void update(char &c, int count) {

C += count + 2;

}

char ch = 'A';

int i;

for (i = 0; i < 4; i++) {

update(ch, i);

cout << ch;

ch = ch + i;

cout << ch;

C.

double num = 0;

int max = 10;

cout fixed < seterecesian(2);

while(num < max) {

cout << num << endl;

num += 2;

}

cout << setw(7) << num;

d.

charch = Z';

1=0;

do

{

thei+2;

cout<< ch;

it+;

}while (i 4);

ch = ch + i;

cout<

  • Write a function that finds the factorial of a number (n!)
  • Write a function that returns the letter grade for a given score
  • Write a function to convert a small letter to a capital letter
  • Write a function that returns true if a character is a small letter, false otherwise
  • Write a function that returns true if a character is a digit, false otherwise
  • Write a function that returns true if a character is a white space, false otherwise
  • Write a function that returns the average of all the numbers stored in a file Write a function that finds the smallest number stored in a file
  • Write a function that counts and returns the number of vowels inside a text file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!