Type int
An integer constant consists of a sequence of one or more digits. A minus sign preceding the sequence indicates that the value is negative. The values 158, –10, and 0 are all valid examples of integer constants. No embedded spaces are permitted between the digits, and commas can’t be used. (So, the value 12,000 is not a valid integer constant and must be written as 12000.)
Every value, whether it’s a character, an integer, or a floating-point number, has a range of values associated with it. This range has to do with the amount of storage allocated to store a particular type of data. In general, that amount is not defined in the language; it typically depends on the computer you’re running on and is therefore called implementation or ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access