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 = 50, y =100
B) ans = 60, x =0, y =50
C) ans = 45, x = 50, y = 0
D) ans = 45, x = 50, y = 50
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q8: What will be the value of ans
Q10: What is the value of ans after
Q12: If str1 and str2 are both Strings,
Q13: When testing for character values, the switch
Q14: What would be the value of discountRate
Q15: What would be the value of bonus
Q16: Which of the following will format 12.78
Q16: A block of code is enclosed in
Q17: What will be the values of ans,
Q18: Which of the following is the correct