Multiple Choice
What is the value of ans after the following code has been executed?
Int x = 40;
Int y = 40;
Int ans = 0;
If (x = y)
Ans = x + 10;
A) 50
B) 80
C) 30
D) No value, this is a syntax error.
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q5: What would be the value of discountRate
Q6: In Java, when a character is stored
Q8: What will be the value of ans
Q12: If str1 and str2 are both Strings,
Q13: When testing for character values, the switch
Q13: What will be the values of ans,
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
Q18: A local variable's scope always ends at