Hi there is a example in the section 7.7 of Expert C Programming which would caused segmentation fault 。
  int *p =0;
  *p =17; /*caused segmentation fault */
but i have test it as below:
#include <stdio.h>
int main()
{
        int *p =0;
        *p = 17;
        return 0;
}
when i doing gcc -c test.c it is OK and there is nothing error about segmentation fault ? why ?
 
     
     
    