The program is:
#include #include int main(void) { char *a=\"abc\",*ptr; ptr=a; ptr++; *ptr=\'k\'; printf(\"
This:
char *a="abc";
is really:
const char *a="abc";
You can't modify ptr, which points to the same address as a.
ptr
a