Data Types

Download c eBook


  • While char is required to be 1 byte, 1 byte is not required to be 8 bits (often also called an octet), even though most of modern computer platforms define it as 8 bits. The implementation's number of bits per char is provided by the CHAR_BIT macro, defined in <limits.h>. POSIX does require 1 byte to be 8 bits.
  • Fixed width integer types should be use sparsely, C's built-in types are designed to be natural on every architecture, the fixed width types should only be used if you explicitly need a specifically sized integer (for example for networking).

Related Examples


208 Contributors: 11
Wednesday, September 14, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook