Attempting to modify the contents of a string literal will invoke undefined behavior (meaning anything from a segfault to the code working as expected); it's best to always assume string literals are unwritable.
Thus, as written, a
should not be the target of any function that attempts to modify the string it's pointing to.
** Edit **
The C language definition doesn't say anything about stacks or heaps; it specifies an object's lifetime and visibility, and it's up to the implementation to map that to a specific architecture and memory model. String literals must be allocated so that they're available over the lifetime of the program. Several common architectures put them in a read-only data segment; some put them in a writable data segment. Some allow you to choose which at compile time.