---
name: "intptr_t"
section: "3type"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/intptr_t/3type"
---

# intptr\_t(3type)

integer types wide enough to hold pointers

## NAME

intptr\_t, uintptr\_t - integer types wide enough to hold pointers

## LIBRARY

Standard C library (*libc*)

## SYNOPSIS

```
#include <stdint.h>
```

**typedef** /\* ... \*/ **intptr\_t;** **typedef** /\* ... \*/ **uintptr\_t;**

**#define INTPTR\_WIDTH**  /\* ... \*/ **#define UINTPTR\_WIDTH INTPTR\_WIDTH**

**#define INTPTR\_MAX**    /\*  2\*\*(INTPTR\_WIDTH - 1) - 1  \*/ **#define INTPTR\_MIN**    /\*  - 2\*\*(INTPTR\_WIDTH - 1)    \*/ **#define UINTPTR\_MAX**   /\*  2\*\*UINTPTR\_WIDTH - 1       \*/

## DESCRIPTION

*intptr\_t* is a signed integer type such that any valid (*void \**) value can be converted to this type and then converted back. It is capable of storing values in the range \[**INTPTR\_MIN**, **INTPTR\_MAX**\].

*uintptr\_t* is an unsigned integer type such that any valid (*void \**) value can be converted to this type and then converted back. It is capable of storing values in the range \[**0**, **UINTPTR\_MAX**\].

The macros \[**U**\]**INTPTR\_WIDTH** expand to the width in bits of these types.

The macros \[**U**\]**INTPTR\_MAX** expand to the maximum value that these types can hold.

The macro **INTPTR\_MIN** expands to the minimum value that *intptr\_t* can hold.

The length modifiers for the \[*u*\]*intptr\_t* types for the [**printf**(3)](/printf/3.md) family of functions are expanded by the macros **PRIdPTR**, **PRIiPTR**, and **PRIuPTR** (defined in *\<inttypes.h\>*); resulting commonly in **%"PRIdPTR"** or **%"PRIiPTR"** for printing *intptr\_t* values. The length modifiers for the \[*u*\]*intptr\_t* types for the [**scanf**(3)](/scanf/3.md) family of functions are expanded by the macros **SCNdPTR**, **SCNiPTR**, and **SCNuPTR** (defined in *\<inttypes.h\>*); resulting commonly in **%"SCNuPTR"** for scanning *uintptr\_t* values.

## STANDARDS

- \[*u*\]*intptr\_t* \[**U**\]**INTPTR\_MAX** **INTPTR\_MIN**

  C23, POSIX.1-2024.

- \[**U**\]**INTPTR\_WIDTH**

  C23.

## HISTORY

- \[*u*\]*intptr\_t*

  SUSv2, C99, POSIX.1-2001 XSI.

- \[**U**\]**INTPTR\_MAX** **INTPTR\_MIN**

  C99, POSIX.1-2001 XSI.

- \[**U**\]**INTPTR\_WIDTH**

  C23.

## NOTES

The following header also provides these types: *\<inttypes.h\>*.

## SEE ALSO

[**intmax\_t**(3type)](/intmax_t/3type.md), [**void**(3)](/void/3.md)
