Solved

What Will Be the Values of Ans,x,and Y After the Following

Question 11

Multiple Choice

What will be the values 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