Write data values stored in a series of user specified variables into a string according to a standard C format specification.
int sprintf( LPSTR lpszBuffer, LPCSTR lpcszFormat, ... )
Returns the number of characters which are written into the string.
EX1
void sprintf_ex1() { char str1[] = "Hello", str2[50]; char cChar = 'C'; int N, iInt = 15; float fFloat = 17.56; N = sprintf( str2, "%s %c %d %f", str1, cChar, iInt, fFloat); out_str(str1); printf("%c\n",cChar); out_int("",iInt); out_double("",fFloat); printf("the string read into str2 is :\n"); out_str(str2); }
Write data values stored in a series of user specified variables into a string according
to a standard C format specification.
origin.h