C usual arithmetic conversions

前端 未结 4 934
攒了一身酷
攒了一身酷 2020-12-01 15:08

I was reading in the C99 standard about the usual arithmetic conversions.

If both operands have the same type, then no further conversion is needed.

4条回答
  •  时光说笑
    2020-12-01 15:48

    0x0000000a plus 0xfffffffb will always be 0x00000005 regardless of whether you are dealing with signed or unsigned types, as long as only 32 bits are used.

提交回复
热议问题