int sprintf(char *str, const char *format, ...);
将...数据 按照format格式 输出到str指向的数组中
例子:
printf("%s %d\n","hello",123);
将"hello",123数据 按照格式("%s %d\n") 输出到终端(hello 123\n)
int sprintf(char *buf, "%s %d\n","hello",123);
将"hello",123数据 按照格式("%s %d\n"),输出到buf指向的数组