functions returning char pointer

No, it is undefined behaviour. It just happens to work in your case, but may stop working at any time.

Leave a Comment