gkarthi29 wrote: > Compiling the following program > > #include <stdio.h> > int main() > { > char **variable=NULL; > > printf("Starting\n"); > fflush(stdout); > while(*variable) > { > printf("Inside while\n"); > fflush(stdout); > break; > } > printf("Ending\n"); > fflush(stdout); > } > > Produces the output > > Starting > Segmentation fault > > My System configuration is, > > Linux 2.6.9-55.0.2.ELsmp #1 SMP x86_64 x86_64 x86_64 GNU/Linux > gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-8) > > basically i need to dereference NULL pointer in the above code.Is there any > option available in Gcc? No. Dereferencing a NULL pointer is always undefined behaviour. Andrew.