With glibc,
- If your program calls
printf("%s", NULL), you get(null), but - if your program calls
printf("%p", NULL), you get(nil).
But why is this the case?
Note: This is not a question about the C language standard, where passing a null pointer for an "%s" specifier results in undefined behavior; I'm asking about glibc's choices specifically (and these values are hard-coded in the glibc sources).