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) 7 15
B) 0 0
C) 10 10
D) 1 1
E) None of these
Correct Answer:
Verified
Q21: This operator is known as the logical
Q27: These operators connect two or more relational
Q28: What is the value of the following
Q35: Given that x = 2, y =
Q39: If you intend to place a block
Q40: What is the value of donuts
Q41: Which value can be entered to
Q42: When a program lets the user know
Q42: If the sub-expression on the left side
Q43: Both of the following if statements perform
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents