Why does “~” operator on a char result in more bytes in C?

后端 未结 0 493
庸人自扰
庸人自扰 2021-01-20 16:47

I am confused by the following code:

char c = 0x66;
printf("~c = %x\\n", ~c); //0xffffff99
printf("size of c: %d\\n", sizeof(c)); //1 byte         


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