I am afraid both of you are incorrect.. 1. since the code modified by you will compile but give sigsegv anyway. 2. The statement " *p = 0; " has nothing to do with the " random address" you are talking about.
On Mon, Dec 17, 2012 at 7:25 PM, Prakhar Jain <[email protected]> wrote: > You are initialising random memory address with 0, which OS doesn't allow. > > On 12/17/12, Shubham Sandeep <[email protected]> wrote: > > how does this code achieve SIGSEGV???? > > code: > > *p;main(){*p=0;} > > > > -- > > Regards, > > SHUBHAM SANDEEP > > IT 3rd yr. > > NIT ALD. > > > > -- > > > > > > > > > -- > -- > Prakhar Jain > IIIT Allahabad > B.Tech IT 4th Year > Mob no: +91 9454992196 > E-mail: [email protected] > [email protected] > > -- > > > -- - Saurabh Paliwal B-Tech. Comp. Science and Engg. IIT ROORKEE --
