Bitmasking quiz Which one line function can be used to get index of the least significant bit that is on (first 1 from right to left in binary representation of an integer)?

please explain me the question?

Hey @akshpreetsinghs
So basically u have to tell the first set bit which is on

Say for 3 its binary is 00000…0011 so here first 1 is rightmost so
its indexed 1

FOr 8 binary is 000…001000 so its index is 4

so in here 3 has 011 the right most set bit indexed pos is 0 , right?

yeah if answer should begin from 0 then 0 indexed

if answer is supposed to begin from1 then 1 indexed

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.