What will the following program segment display? int funny = 7, serious = 15; funny = serious 2; if (funny ! = 1) (funny = 0; serious = 0;) else if (funny == 2) {funny = 10; serious = 10;} else {funny = 1; serious = 1;} cout << funny << * * << serious << endl;A) 0 0B) 7 15C) 10 10E) None of these.

Respuesta :

Answer:

The output to the given question is the option "E".

Explanation:

In C++ program two integer variable is defined that is funny and serious. In this variable, we assign a value that is 7, and 15. Then we calculate the modules of the serious variable that is 1 and hold its value in funny variables. Then we use the If -else -if ladder conditional statement. In the if block we check if the value of the funny variable is not equal to 1 if this condition is true so the value of the funny and serious variable is the change that is 0. In the else if block we check condition that if funny variable value is equal to 2. so the value of the funny and serious variable is change that is 10. In else part, the value of the funny and serious variable is 1. In the program, the value of the funny variable is 1. So the output of the program is option E which is "None of these".

Answer:

sorry, what?

Explanation: