C 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

int snprintf(char * restrict buf, size_t num, const char * restrict format, ...)

C Online Test

« Previous Function Next Function »

Like/Share Us on Facebook 😋