intptr_t(3type)

πŸ’– intptr_t β€” the manual page, but make it make sense πŸ’–

okay so bestie, welcome to the <bold>intptr_t(3type)</bold> glow-up πŸ’… this is the man page for the pointer-sized integer types, and honestly? they're lowkey the moment. no cap.


✨ 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 with main character energy for one very specific job: any valid (void *) value can be converted to this type, and then converted back again. it's capable of storing values in the range [INTPTR_MIN, INTPTR_MAX] ✨

uintptr_t is the unsigned sibling doing the exact same trick β€” any valid (void *) value converts into it and back again, no cap. it can store 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 these types can hold πŸ”₯

the macro INTPTR_MIN expands to the minimum value that intptr_t can hold 🌸

okay now the printf(3) family tea β˜• the length modifiers for the [u]intptr_t types are expanded by the macros PRIdPTR, PRIiPTR, and PRIuPTR (defined in <inttypes.h>); resulting commonly in %"PRIdPTR" or %"PRIiPTR" for printing intptr_t values πŸ‘‘

and for the scanf(3) family, the length modifiers for the [u]intptr_t types 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 πŸŽ€

heads up bestie, this other header also provides these types: <inttypes.h> πŸ™ˆ


πŸ’– SEE ALSO πŸ’–

intmax_t(3type), void(3) ⭐


and that's the whole vibe, bestie β€” this page was brought to you by the Linux man-pages 6.20, dated 2026-02-08, filed under intptr_t(3type). slay, stay pointer-safe, and hydrate πŸ’§πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms