[Solved] Unable to alter a character in string literal Via pointer [duplicate]

[ad_1]

You may not change a string literal that way.

https://stackoverflow.com/a/17507772/234307

“A C string literal creates an anonymous array of char. Any attempt to modify that array has undefined behavior.” – Keith Thompson

1

[ad_2]

solved Unable to alter a character in string literal Via pointer [duplicate]