Share
Explore BrainMass

Why Do We Need Smaller Data Types in C

There are at least two types of integers (short or long) and two types of decimals (float or double) in most C language compilers. We should write all the programs using longs and doubles without ever needing shorts or floats. What do you think was the idea of adding these two additional (smaller) types?

Solution Summary

There are at least two types of integers (short or long) and two types of decimals (float or double) in most C language compilers. We should write all the programs using longs and doubles without ever needing shorts or floats. The following solution discusses why we would ever need these two additional (smaller) types.
I have compiled a comprehensive response, based on my on experience and discussion with other programmers. I am confident you will find the discussion helpful.

$2.19