codescracker


c

C snprintf()



« Previous Function Next Function »


snprintf()

The snprintf() function is same as sprintf() function except that a maximum of num-1 characters will be stored into the array pointed to by buf. On completing, this array is null terminated. Thus, the snprintf() function allows you to prevent buf from being overrun.

snprintf() Syntax

#include<stdio.h>
int snprintf(char * restrict buf, size_t num, const char * restrict format, ...)

« Previous Function Next Function »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test