Computer Science, asked by anubhasinghk10cca, 1 month ago

What are the value of x and y when the following statements are expression executed. int a = 55, b:35; boolean x = (a b)? a: b;​

Answers

Answered by llMsBrainlyTrainerll
0

Answer:

if statement tells the program to execute a of if a condition is true. In the e below, we output e only if x is greater

Answered by vikrantvikrantchaudh
2

Answer:

The ternary operator (a > b)? true : false returns true as its condition a > b is true so it returns its first expression that is true.

The ternary operator (a < b)? a : b returns b as its condition a < b is false so it returns its second expression that is b. Value of b is 36 so y also becomes 36.

Similar questions