What will be displayed after the following statements execute?
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
Q18: After the following code executes, what is
Q19: If you place a semicolon after the
Q20: What is the output of the following
Q21: What is the output of the
Q22: Which of the following is evaluated first,
Q24: What is the value of the following
Q25: A variable, usually a bool or an
Q26: What is the output of the following
Q27: These operators connect two or more relational
Q28: If you intend to place a block
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