---
name: "xprintf_exec"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["macos"]
url: "https://new.carta.tech/xprintf_exec"
---

# xprintf\_exec(3)

execute-only extensible printf execution

## NAME

**asxprintf\_exec**, **dxprintf\_exec**, **fxprintf\_exec**, **sxprintf\_exec**, **xprintf\_exec**, **vasxprintf\_exec**, **vdxprintf\_exec**, **vfxprintf\_exec**, **vsxprintf\_exec**, **vxprintf\_exec** – execute-only extensible printf execution

## SYNOPSIS

**#include \<printf.h\>**

*int*\

**asxprintf\_exec**(*char \*\* restrict ret*, *printf\_comp\_t restrict pc*, *...*);

*int*\

**dxprintf\_exec**(*int fd*, *printf\_comp\_t restrict pc*, *...*);

*int*\

**fxprintf\_exec**(*FILE \* restrict stream*, *printf\_comp\_t restrict pc*, *...*);

*int*\

**sxprintf\_exec**(*char \* restrict str*, *size\_t size*, *printf\_comp\_t restrict pc*, *...*);

*int*\

**xprintf\_exec**(*printf\_comp\_t restrict pc*, *...*);

**#include \<stdarg.h\>**

*int*\

**vasxprintf\_exec**(*char \*\* restrict ret*, *printf\_comp\_t restrict pc*, *va\_list ap*);

*int*\

**vdxprintf\_exec**(*int fd*, *printf\_comp\_t restrict pc*, *va\_list ap*);

*int*\

**vfxprintf\_exec**(*FILE \* restrict stream*, *printf\_comp\_t restrict pc*, *va\_list ap*);

*int*\

**vsxprintf\_exec**(*char \* restrict str*, *size\_t size*, *printf\_comp\_t restrict pc*, *va\_list ap*);

*int*\

**vxprintf\_exec**(*printf\_comp\_t restrict pc*, *va\_list ap*);

## DESCRIPTION

These functions are execute-only, extensible printf (see [xprintf(5)](/xprintf/5.md)) variants, taking a *printf\_comp\_t* structure created by the format string compilation routine new\_printf\_comp(3). All these variants behave like their normal printf counterparts (see [printf(3)](/printf/3.md)) without ‘x’ and “\_exec” in the name (except **sxprintf\_exec**() and **vsxprintf\_exec**() behave like **snprintf**() and **vsnprintf**(), respectively).

## SEE ALSO

[printf(3)](/printf/3.md), [xprintf\_comp(3)](/xprintf_comp/3.md), [xprintf(5)](/xprintf/5.md)
