int (*a)[10] = NULL; // initilaized to NULL pointer
printf("a :: %p\n", a); // print nil
printf("*a :: %p\n", *a); // seg fault??
return 0;
I executed this code on my x86 code using gcc, and it compiles without any error.
I expected something like
a :: (nil)
Segmentation Fault
but it actually prints out
a :: (nil)
*a :: (nil)
Why here referencing null pointer does not cause seg fault?