That's not passing by reference. You cannot pass by reference in C. That's passing a pointer to a pointer, by value, and it only decreases performance.Code://They said passing by reference gives better performance: int strlen_byref(char **str)
You can't stop a crash from occurring when passing in an uninitialised pointer. Checking for NULL is the caller's responsibility, as usually the passed pointer is to a buffer and would not be NULL.
Questions are welcomeComments are welcome