Solved

What Will the Following Program Segment Display? Int Funny = \quad

Question 26

Multiple Choice

What will the following program segment display? int funny = 7, serious = 15;
funny = serious % 2;
if (funny != 1)
{
\quad funny = 0;
\quad serious = 0;
}
else if (funny == 2)
{
\quad funny = 10;
\quad serious = 10;
}
else
{
\quad funny = 1;
\quad serious = 1;
}
Cout << funny << " " << serious << endl;


A) 7 15
B) 0 0
C) 10 10
D) 1 1
E) None of these

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions