Does the size of an int depend on the compiler and/or processor?

前端 未结 10 1453
借酒劲吻你
借酒劲吻你 2020-11-22 11:58

Would the size of an integer depend upon the compiler, OS and processor?

10条回答
  •  爱一瞬间的悲伤
    2020-11-22 12:44

    Yes , I found that size of int in turbo C was 2 bytes where as in MSVC compiler it was 4 bytes.

    Basically the size of int is the size of the processor registers.

提交回复
热议问题