Is there an easy way to escape all special characters in the printf() function?
printf()
The reason why I would like to know how to do this is because I am print
Use the isprint library function to determine if the character is printable:
isprint
#include ... if (isprint(data[i])) printf(" %c", data[i]); // prints character else printf(" %d", data[i]); // prints code value for character