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.
#include<stdio.h> int snprintf(char * restrict buf, size_t num, const char * restrict format, ...)
© Copyright 2021. All Rights Reserved.