It received SIGSEGV on the 3rd line. But if I useCode:
char *p = "Abc";
*p = 'a';
, it goes well.Code:
char p = "Abc";
So why I can't change *p when p is a pointer to a string? And, it's all right if I change it using gdb when I debug it.