On this page
  1. int
  2. Availability
  3. Syntax & Overview
  4. Notes & Pitfalls
  5. Example

int

Prev: char | Up: builtins | Next: nullptr
Rel: stdint.h
Ref: cppreference — int
Tags: #public #prog #c #builtins #tier/core


Availability

Built-in (Built-in Type) — requires no #include header.

Syntax & Overview

int  |  unsigned int

Natural signed integer type (at least 16 bits, 32 bits on modern LP64/LLP64 systems).

Notes & Pitfalls

Example

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

int main(void) {
    int x = 42;
    assert(x <= INT_MAX);
}

Linked from

Related notes