local_string is going to be a pointer to a const, so it is probably safe in a very strange sort of way.
The whole original question is a bit made-up.
... and print them asynchronous ...
What does that mean?
Please post proper code that attempts to do something useful not some sort of programming exercise.
@OP in general you should never return pointers to local variables, they probably aren't going to be valid. In your particular case the example might work, but not because of good design.