Why were short, int, and long invented in C?
https://softwareengineering.stackexchange.com/questions/115240
-
03-11-2019 - |
質問
I'm having trouble understanding, what were the exact purposes of creating the short
, int
, and long
data types in C?
The reason I ask is, it doesn't seem like their sizes are bounded -- they could be of any size, so long as short
is smaller than an int
, for example.
In which situations, then, should you use an unsigned int
or unsigned long
, for example, instead of a size_t
, when doing so offers no hope of binary compatibility?
(If you don't know the size, then how would you know when to choose which?)
正しい解決策はありません
所属していません softwareengineering.stackexchange