Lecture : Ternary Operator

In the code-
Int x= no%2?0:1;
How it is executed ?i.e. I am unable to understand how it is processed because we haven’t specified the remainder of no%2 and directly wrote the output ?

the expression no%2 will return true or false so according to statement if n%2 is 1 i.e if remainder is 1 then value of x will be 0 otherwise if remainder is 0 then expression returns false and value of x will be 1 . 0 means false and 1 means true .