va_list(3type)

πŸ’– va_list(3type) β€” the variable argument list, bestie πŸ’–

okay so you know how some functions are like "idk how many args you're gonna give me, surprise me"? yeah. that's what va_list is for. it's the variable argument list type from the 3type section of the manual, and she is that girl. πŸŽ€


πŸ“š LIBRARY

Standard C library (libc) 🫢


✨ SYNOPSIS ✨

#include <stdarg.h>

typedef /* ... */  va_list;

look at her. mysterious. the /* ... */ is doing main character energy because the actual definition is implementation-defined. iconic. πŸ’…


🌸 DESCRIPTION 🌸

So here's the vibe: va_list is used by functions that take a varying number of arguments of varying types. Like, a function that's just like "bring whoever, bring whatever." πŸ¦‹

The function must declare an object of type va_list, and that object is what the macros va_start(3), va_arg(3), va_copy(3), and va_end(3) use to traverse the list of arguments. Think of it like the lil itinerary for walking through all the args you got handed. πŸŽ€

no cap: if you skip declaring that va_list object, the whole thing falls apart. it's giving necessary. 😭

⭐ STANDARDS ⭐

  • C11
  • POSIX.1-2024

she's certified. she's standardized. periodt. πŸ‘‘


🌈 HISTORY 🌈

  • C89
  • SUSv1
  • POSIX.1-2001

she's been here since forever, lowkey an elder icon at this point. πŸ’œ


πŸ“ NOTES πŸ“

heads up bestie β€” these headers also provide va_list, so you're not stuck with just <stdarg.h>:

  • <stdio.h>
  • <wchar.h>

fr fr, she gets around. 🧚


πŸ‘€ SEE ALSO πŸ‘€

the whole squad. go read them, iykyk. πŸ“


and that's the page, bestie!! this was Linux man-pages 6.20, dated 2026-02-08 β€” mwah, slay, go write some variadic functions responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ 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