Multiple Choice
What will be the values of ans, x, and y after the following statements are executed?
int ans = 35, x = 50, y = 50;
If (x >= y)
{
Ans = x + 10;
X -= y;
}
Else
{
Ans = y + 10;
Y += x;
}
A) ans = 60, x = 0, and y = 50
B) ans = 45, x = 50, and y = 0
C) ans = 45, x = 50, and y = 50
D) ans = 60, x = 50, and y = 100
Correct Answer:

Verified
Correct Answer:
Verified
Q6: Enclosing a group of statements inside a
Q7: An important style rule that should be
Q15: Unicode is an international encoding system that
Q22: The boolean expression in an if statement
Q25: _ operators are used to determine whether
Q28: A block of code is enclosed in
Q36: What will be displayed after the following
Q42: Which of the following expressions could be
Q54: What will be the value of bonus
Q55: What will be the value of x