On this page
  1. CHAR_BIT
  2. Include
  3. Signature & Overview
  4. Notes & Pitfalls
  5. Example

CHAR_BIT

Prev: INT_MAX | Up: limits.h | Next: DBL_EPSILON
Rel: limits.h, stdint, stdbool & limits Guide
Ref: cppreference — CHAR_BIT
Tags: #public #prog #c #stdlib #limits #tier/standard


Include

#include <limits.h>

Signature & Overview

#define CHAR_BIT /* >= 8 */

Number of bits in a byte (char), 8 on POSIX/Windows/macOS.

Notes & Pitfalls

Example

#include <assert.h>
#include <limits.h>

int main(void) { assert(CHAR_BIT >= 8); }

Linked from

Related notes