[Solved] What is the difference between a double and short type in C? [closed]


From Wikipedia:

Short: Short signed integer type. Capable of containing at least the [−32,767, +32,767] range;[3][4] thus, it is at least 16 bits in size. The negative value is −32767 (not −32768) due to the one’s-complement and sign-magnitude representations allowed by the standard, though the two’s-complement representation is much more common.

Double: Real floating-point type, usually referred to as a double-precision floating-point type. Actual properties unspecified (except minimum limits), however on most systems this is the IEEE 754 double-precision binary floating-point format. This format is required by the optional Annex F “IEC 60559 floating-point arithmetic”.


Something to keep in mind, shorts need to be an integer type (No decimal). Doubles are floating type (With decimal).

solved What is the difference between a double and short type in C? [closed]