I am learning pointers in C. When I declare :
char c1[] ="hello";
c1[0] = c1[1];
printf("%s\n", c1);
It prints out eello
But when I do the following:
char * c2="hello";
c2[0] = c2[1];
printf("%s\n", c2);
it compiles in C# but the program crashes. Could you help me clarify what happens in the Stack when I execute the program?