Check if integer is 0 with two bitwise operations

前端 未结 0 1953
情书的邮戳
情书的邮戳 2020-11-29 23:08

I\'m trying to write a function isZero(int x) that returns 1 if x is 0, and returns 0 otherwise. How can i only do this with two bitwise operators?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题