Writing a library - returning a char array

You can return a const pointer to the array back to the calling function. That way it can only be used to read from the array, not modify it.