Hi, everyone. I have:

printf ("Our data are : %d, %c, %x, %p", myint, mychar, myhex, mypointer);

Now, this will return the number of characters printed. Is there any way to find out the length of the printed text before it gets printed? Is this the best that can be done?

Code:
char szbuffer[100];
snprintf (szbuffer, 100, "Our data are : %d, %c, %x, %p", myint, mychar, myhex, mypointer);
strlen (szbuffer);