Can somebody help me understand this behaviour... ?
I have a snippet like this
#include <stdio.h>
int main()
{
char *ptr = "Hello";
printf("%c ",++*ptr);
return 0;
}
I expected (keeping in mind the precendence order of ++ and * and R to L associativity) that the output should be
I (the letter I)
but it is not so, rather the program crashes.
so pls somebody explain, what am I missing here?