SyntaxFix
Write A Post
Hire A Developer
Questions
char* myFunction() { return "My String"; }
In C, string literals are arrays with the static constant memory class, so returning a pointer to this array is safe. More details are in Stack Overflow question "Life-time" of a string literal in C