From the course: C Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Integer types

Integer types

- [Instructor] Integer types are simple primitive data types for representing integer values. Whole numbers with no fractional part. The integer types include char, int, short int, long int, and long long int. These are all available in both signed and unsigned versions. The size of each type will vary depending upon both the architecture and the compiler. The char type is defined as the minimum necessary size to contain a character. On most modern systems it's eight bits. The char type may be signed or unsigned by default. That is, on some systems it may be signed, and on other systems it may be unsigned. You cannot count on a char being one or the other. The only thing you can count on is that will hold a character. All the other integer types are signed unless modified with the unsigned keyword. The short int type is the smallest natural size of an integer on the target processor. May be the same as int on modern…

Contents