from small one page howto to huge articles all in one place

search text in:




Other .linuxhowtos.org sites:gentoo.linuxhowtos.org



Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

209582

userrating:


May 25th. 2007:
Words

486

Views

258591

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

149880

userrating:


April, 26th. 2006:

Druckversion
You are here: manpages





sprintf

Section: C Library Functions (3)
Updated: 202-1-07
Index Return to Main Contents
 

NAME

sprintf, vsprintf - string print formatted  

LIBRARY

Standard C library (libc,~-lc)  

SYNOPSIS

#include <stdio.h>
int sprintf(char *restrict str,
            const char *restrict format, ...);
int vsprintf(char *restrict str,
            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
 

DESCRIPTION

These functions are equivalent to snprintf(3) and vsnprintf(3), except that no check for buffer overrun is performed (see BUGS below).  

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
sprintf(), vsprintf() Thread safetyM-Safe locale
 

STANDARDS

C11, POSIX.-2008.  

HISTORY

C89, POSIX.-2001.  

BUGS

See printf(3).  

sprintf(), vsprintf()

Because sprintf() and vsprintf() assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure. Note that the length of the strings produced is local-dependent and difficult to predict. Use snprintf() and vsnprintf() instead (or asprintf(3) and vasprintf(3)).  

SEE ALSO

asprintf(3), snprintf(3)


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
ATTRIBUTES
STANDARDS
HISTORY
BUGS
sprintf(), vsprintf()
SEE ALSO





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 16.0 ms