Why is strlen() not checking for NULL?
strlen()
if I do strlen(NULL), the program segmentation faults.
strlen(NULL)
Trying to understand the rationale be
A little macro to help your grief:
#define strlens(s) (s==NULL?0:strlen(s))