Greetings.
I was wondering, can it be safely assumed that any function that returns
a *char will return a NULL terminated string? Or does the function
explicitly mention this always (and the ones that don't do not return
null terminated strings?)
Nope. A function returning a *char might not even return something pointing
to a string at all (i.e., when it returns the pointer value NULL). Always
read the function's documentation (or the code itself, if there is no
documentation) to determine what conclusions can be drawn regarding the
return value.
Note that you appear to be confusing some terminology with respect to
strings and pointers -- NULL (in capital letters) refers to a specific
pointer value denoting that the pointer does not point to any memory in
particular. On the other hand, the "null" in the phrase "null-terminated
string" refers to the character '\0' (named NUL in ASCII, though of course
you might not be using an ASCII system), which is used in C as an
end-of-string marker. The character '\0' and the pointer value NULL might
technically have the same integral value from a human's point of view, but
as they are of different types they cannot be considered equal or used
(either in code or in natural language) interchangeably.
Regards,
Tristan