CHAPTER 3
Variables
Variables are used for storing data during program execution.
Data Types
Depending on what data you need to store, there are several different kinds of data types. The simple types in C consist of four integer types: three floating-point types as well as the char type.
Data Type |
Size (byte) |
Description |
---|---|---|
char |
1 |
Integer or character |
short int long long long |
2 4 4 or 8 8 |
Integer |
float double long double |
4 8 8 or 16 |
Floating-point number |
In C, the exact size of the data types is not fixed. The sizes shown in the previous table are those commonly found on 32-bit and 64-bit systems. The C ...
Get C Quick Syntax Reference 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.