Domanda di colloquio di Command Alkon

How would you determine if a number is even or odd programmatically?

Risposta di colloquio

Anonimo

1 apr 2016

I used bitwise operations to check if the least significant bit was set to one. Another solution could be to use modulo operators.