Solved

What Is the Value of Ans, X, and Y After

Question 29

Multiple Choice

What is the value of ans, x, and y after the following statements are executed?
int ans = 0, x = 15, y = 25;
If ( x >= y)
{
Ans = x + 10;
X -=y;
}
Else
{
Ans = y + 10;
Y += x;
}


A) ans = 0, x = 15, y = 25
B) ans = 25, x = -10, y = 25
C) ans = 35, x = 15, y = 40
D) ans = 25, x = 15, y = 40

Correct Answer:

verifed

Verified

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

Related Questions