printf with %s to include null characters

I need to concatenate some strings, and I need to include NULL bytes. I don't want to treat a '\0' as a terminating byte. I want to save my valuable NULL bytes!

In a code example, if

    char *a = "\0hey\0\0";

I need to printf in a format that will output "\0hey\0\0".

-AUstin

11
задан austin 23 May 2011 в 06:36
поделиться