Well... you are saying that it's not possible to change a string literal declared has a pointer but i've compiled this code and it worked:
#include <stdio.h>
int main() {
char *a = "hello";
printf("%s\n", a);
*a = 'a';
printf("%s\n", a);
return 0;
}
When i run the program it shows "hello" followed by "aello".
Can you tell me why can i modify the string pointed by "char *a"?
