One more query. What if the architecture is 64 bit, but the OS is 32 bit? (Example windows XP)
What will be the size of a pointer variable then? On Sat, Jul 30, 2011 at 8:00 PM, Nikhil Gupta <nikhilgupta2...@gmail.com>wrote: > @Aditi, Isn't the size of int variable 4 bytes in both the architectures? > > On Sat, Jul 30, 2011 at 12:52 PM, aditi garg <aditi.garg.6...@gmail.com>wrote: > >> it can also be found out by using printf("%d",sizeof(int)*8); >> Correct me if i am wrong... >> >> >> On Sat, Jul 30, 2011 at 11:55 AM, rajeev bharshetty <rajeevr...@gmail.com >> > wrote: >> >>> If pointer size is 4bytes then it is 32 bit machine and if 8 bytes it is >>> 64 bit >>> >>> >>> On Sat, Jul 30, 2011 at 11:51 AM, Nikhil Gupta < >>> nikhilgupta2...@gmail.com> wrote: >>> >>>> How do you find out if a machine is 32 bit or 64 bit? >>>> >>>> I was thinking since the size of pointer variable is different in the 2 >>>> configurations, we can declare a pointer and use sizeof() >>>> Will that work? >>>> Any other suggestions? >>>> >>>> -- >>>> Nikhil Gupta >>>> >>>> -- >>>> 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> >>> >>> "*Winners Don't do Different things , they do things Differently"* >>> >>> -- >>> 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. >>> >> >> >> >> -- >> Aditi Garg >> Undergraduate Student >> Electronics & Communication Divison >> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY >> Sector 3, Dwarka >> New Delhi >> >> >> -- >> 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. >> > > > > -- > Nikhil Gupta > Senior Co-ordinator, Publicity > CSI, NSIT Students' Branch > NSIT, New Delhi, India > > -- Nikhil Gupta Senior Co-ordinator, Publicity CSI, NSIT Students' Branch NSIT, New Delhi, India -- 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.