What does tilde(~) operator do?

前端 未结 3 452
既然无缘
既然无缘 2020-11-29 01:25

I recently saw the above operator in a code,I googled for it but found nothing.The code is below.Please describe what actually does this operator do?

#includ         


        
3条回答
  •  醉酒成梦
    2020-11-29 01:39

    It is the bitwise complement operator. Given the input

    010011101

    returns the output:

    101100010

提交回复
热议问题