Is int in C Always 32-bit?

后端 未结 8 1983
故里飘歌
故里飘歌 2020-12-05 05:17

This is related to following question,

How to Declare a 32-bit Integer in C

Several people mentioned int is always 32-bit on most platforms. I am curious if

相关标签:
8条回答
  • 2020-12-05 05:53

    If you are also interested in the actual Max/Min Value instead of the number of bits, limits.h contains pretty much everything you want to know.

    0 讨论(0)
  • 2020-12-05 05:56

    At this moment in time, most desktop and server platforms use 32-bit integers, and even many embedded platforms (think handheld ARM or x86) use 32-bit ints. To get to a 16-bit int you have to get very small indeed: think "Berkeley mote" or some of the smaller Atmel Atmega chips. But they are out there.

    0 讨论(0)
提交回复
热议问题