Why does fprintf(“%s”,NULL) cause a segmentation fault?
Some applications erroneously assume that a null character pointer should be treated the same as a pointer to a null string. A segmentation violation occurs in these applications when a null character pointer is accessed. There are several reasons for not having the *printf() family of functions check for null pointers.