thanks for all for clearing my doubt :) On Sat, May 21, 2011 at 12:07 AM, Selvakumar N <selvakumaronf...@gmail.com>wrote:
> Two byte rep : > 256(00000001) + 1(00000001) > > iPtr points to least significant byte , iPtr + 1 points to most significant > byte > > P.S : Not verified by code > -Selva > > On Fri, May 20, 2011 at 8:49 PM, siva viknesh <sivavikne...@gmail.com>wrote: > >> >> main() >> { >> int i = 257; >> int *iPtr = &i; >> printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); >> } >> Answer: >> 1 1 >> >> >> main() >> { >> int i = 258; >> int *iPtr = &i; >> printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); >> } >> Answer: >> 2 1 >> >> >> >> ..can anybody explain how?? >> -- >> Regards, >> $iva >> >> -- >> You received this message because you are subscribed to the Google Groups >> "ACM Anna University" group. >> To post to this group, send an email to acm...@googlegroups.com. >> To unsubscribe from this group, send email to >> acm_au+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/acm_au?hl=en-GB. >> > > -- > You received this message because you are subscribed to the Google Groups > "ACM Anna University" group. > To post to this group, send an email to acm...@googlegroups.com. > To unsubscribe from this group, send email to > acm_au+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/acm_au?hl=en-GB. > -- Regards, $iva -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.