Summary

C has a variety of data types. The basic types fall into two categories: integer types and floating-point types. The two distinguishing features for integer types are the amount of storage allotted to a type and whether it is signed or unsigned. The smallest integer type is char, which can be either signed or unsigned, depending on the implementation. You can use signed char and unsigned char to explicitly specify which you want, but that's usually done when you are using the type to hold small integers rather than character codes. The other integer types include short, int, long, and long long type. C guarantees that each of these types is at least as large as the preceding type. Each of them is a signed type, but you can use the unsigned ...

Get C Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.