Computer Science, asked by sivansantosh85, 8 months ago

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 mohakpheonix
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 krishnajana295
0

\huge\pink{\mid{\underline{\overline {\tt Answer:-}} \mid}}

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.

\boxed{Thanks}

______________________________

  {\red {I  \: hope  \: this  \: may  \: help \:  you}}

Similar questions