This might sound pretty old school, but I'm still unable to figure out why the following program throws a segmentation fault. Any help would be great
#include <stdio.h>
pointer(char **x)
{
printf ("Before %c",*x[0]);
*x[0] = 'a'; // segmentation fault here!!
printf ("After %c", *x[0]);
}
int main()
{
char *x = "Hello";
pointer(&x);
}