Hi. This code:
results in this output:Code:struct node {
int data[10];
};
int main()
{
struct node* head;
int x;
head->data[0] = 42;
x = head->data[0];
printf(" x is %d\n",x);
}
" x is 42
Segmentation fault"
Explanation and solution appreciated :)