int a=63, b=36;
boolean x=(a>b) : true : false ;
int y = (a<b) ? a:b;
Ox=true and y= 36
O
x= false and = 36
O
x= true and y= 63
O
x= false and y= 63
Answers
Answered by
7
Answer:
option A
Explanation:
in first conditional statement we get that a is actually greater than b (63>36),and a Boolean variable cam inly store true or false, thus, Boolean x= True
In the second conditional statement,
an Integer variable is used to store the value that will be returned from the condition (a<b)? which is false (63 is not less than 36) , in which case, int y will be 36
Answered by
0
X = true and Y = 36
The value of x will be true because the condition (a>b) is true.
The value of y will be 36 because the condition (a<b) is false, so the value of b (which is 36) is assigned to y.
This question was asked in ICSE 2012.
______________________________
Similar questions
Biology,
4 months ago
Math,
4 months ago
English,
4 months ago
Accountancy,
1 year ago
Physics,
1 year ago