Ternary operator

in videos one example what is the meaning of //no&1//before ‘?’ ??? what is the meaning of “no&1”

Hi @Madhavendra-Gupta-2240591552663161
‘&’ is the bitwise AND operator as you will learn later in Bitmasking section.
no&1 is a simple test to determine whether the number ‘no’ is odd or even.
no&1 returns 1 if the number is odd or 0 if it is even.
You can do alternatively use no%2==0 check as well which returns 1 if ‘no’ is even and 0 if it is odd.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.