#include <stdarg.h>
#include <stdio.h>
#define PRINT(...)\
{\
char str[100]={0}; \
fprintf(stdout, "1: %d\n", snprintf(str, sizeof(str), "%s: ", __func__)); \
fprintf(stdout, "2: %d\n", snprintf(str, sizeof(str), __VA_ARGS__)); \
fprintf(stdout, "3: %d\n", snprintf(str, sizeof(str),"%s\n", str)); \
fprintf(stdout, "%s", str);\
}
int main(void)
{
fprintf(stdout, "Hi\n");
PRINT("hello: %d %d %s\n", 55, 32, "John");
fprintf(stdout, "Hi\n");
return 0;
}