This question already has an answer here:
Modify a string with pointer [duplicate]
In C all string literals are read only arrays of characters. Trying to modify a string literal leads to undefined behavior. That's the reason you should only use
const char * when having pointers to string literals.
Try to use your own array instead:
char c = "HELLO";