Chapter 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. ANSI C enables you to use signed char and unsigned char to explicitly specify which you want. The other integer types include short, int, long, and the C9X-proposed 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 with ANSI C you can use the unsigned keyword to create the corresponding unsigned types: ...

Get C Primer Plus®, Third 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.