size of int variable

前端 未结 6 1060
我在风中等你
我在风中等你 2020-11-30 14:34

How the size of int is decided?

Is it true that the size of int will depend on the processor. For 32-bit machine, it will be 32 bits and for 16-bit it\'s 16.

6条回答
  •  攒了一身酷
    2020-11-30 15:03

    It depends on the compiler.

    For eg : Try an old turbo C compiler & it would give the size of 16 bits for an int because the word size (The size the processor could address with least effort) at the time of writing the compiler was 16.

提交回复
热议问题