i think it will be 34... Thanks and regards, Gajendra Dadheech
On Sun, Feb 6, 2011 at 10:15 PM, jalaj jaiswal <[email protected]>wrote: > @ranjane > the value of i will not change as ++ptr will execute first. > but i wonder if a char pointer can be used to store integer address... will > it be an error ? > > > On Sun, Feb 6, 2011 at 10:09 PM, ranjane <[email protected]> wrote: > >> what s the o/p of the followin pgm? >> >> main() >> { >> int i=300; >> char *ptr; >> ptr=&i; >> *++ptr=2; >> printf("%d",i); >> } >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > > -- > With Regards, > *Jalaj Jaiswal* (+919019947895) > Final Year Undergraduate, > IIIT ALLAHABAD > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
