@Varun Ofcourse It Will !!! :) On Mon, Jul 25, 2011 at 11:54 AM, varun pahwa <varunpahwa2...@gmail.com>wrote:
> @Rajeev : little endian and big endian could create difference in the > answers. > > On Mon, Jul 25, 2011 at 11:50 AM, rajeev bharshetty > <rajeevr...@gmail.com>wrote: > >> 257 is stored as >> B A >> 00000000 00000000 00000001 00000001 >> >> So iptr if int* will be pointing to this above >> >> So if we typecast it as char* then it will point to 00000001 (A) >> and *ptr+1 will point to 00000001(B) >> >> Hope this clear . >> >> >> On Mon, Jul 25, 2011 at 11:41 AM, aditya kumar < >> aditya.kumar130...@gmail.com> wrote: >> >>> main() >>> { >>> int i = 257; >>> int *iPtr = &i; >>> printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); >>> } >>> >>> can any one explain me the o/p ?? >>> >>> -- >>> 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. >>> >> >> >> >> -- >> Regards >> Rajeev N B <http://www.opensourcemania.co.cc> >> >> -- >> 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. >> > > > > -- > Varun Pahwa > B.Tech (IT) > 7th Sem. > Indian Institute of Information Technology Allahabad. > Ph : 09793899112 > Official Email :: rit2008...@iiita.ac.in > Another Email :: varunpahwa.ii...@gmail.com > > People who fail to plan are those who plan to fail. > > -- > 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. > -- Regards Rajeev N B <http://www.opensourcemania.co.cc> -- 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.