Sign up
Sign in
Topics
Computing
Starting Out with Java From Control Structures through Data Structures
Quiz 3: Decision Structures
What Is the Value of Ans After the Following Code
Question 24
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.
Explore answers and all related questions
Related questions
Q 25
What is the value of ans after the following code has been executed? int x = 35; Int y = 20,ans = 80; If (x < y); Ans += y; A) 80 B) 100 C) 35 D) 55
Q 26
Enclosing a group of statements inside a set of braces creates a A) block of statements B) boolean expression C) loop D) Nothing,it is just for readability
Q 27
This is a boolean variable that signals when some condition exists in the program A) Sentinel B) Block C) Flag D) Case
Explore all questions