Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   printf    ( 3 )

преобразование форматированного вывода (formatted output conversion)

  Name  |    Synopsis    |  Description  |  Return value  |  Attributes  |  Conforming to  |  Note  |  Bugs  |  Examples  |  See also  |

Синопсис (Synopsis)

#include <stdio.h>

int printf(const char *restrict format, ...); int fprintf(FILE *restrict stream, const char *restrict format, ...); int dprintf(int fd, const char *restrict format, ...); int sprintf(char *restrict str, const char *restrict format, ...); int snprintf(char *restrict str, size_t size, const char *restrict format, ...);

#include <stdarg.h>

int vprintf(const char *restrict format, va_list ap); int vfprintf(FILE *restrict stream, const char *restrict format, va_list ap); int vdprintf(int fd, const char *restrict format, va_list ap); int vsprintf(char *restrict str, const char *restrict format, va_list ap); int vsnprintf(char *restrict str, size_t size, const char *restrict format, va_list ap);

Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

snprintf(), vsnprintf(): _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE || /* Glibc <= 2.19: */ _BSD_SOURCE

dprintf(), vdprintf(): Since glibc 2.10: _POSIX_C_SOURCE >= 200809L Before glibc 2.10: _GNU_SOURCE