thanks for all for clearing my doubt :) On Sat, May 21, 2011 at 12:07 AM, Selvakumar N <[email protected]>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 <[email protected]>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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [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.
