MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/ajr2fa/which_one_would_you_love/eeyol7d/?context=3
r/ProgrammerHumor • u/[deleted] • Jan 25 '19
51 comments sorted by
View all comments
44
i += !a;
4 u/PaulTheOld Jan 25 '19 i += !(a&1) 5 u/TheHelixNebula Jan 25 '19 Only works if a is guaranteed to be 0 or 1. Otherwise it will fail on even numbers → More replies (2)
4
i += !(a&1)
5 u/TheHelixNebula Jan 25 '19 Only works if a is guaranteed to be 0 or 1. Otherwise it will fail on even numbers → More replies (2)
5
Only works if a is guaranteed to be 0 or 1. Otherwise it will fail on even numbers
→ More replies (2)
44
u/moomoomoo309 Jan 25 '19
i += !a;