top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

WAP to check that system is 32 bit or 64 bit ?

+3 votes
119 views

WAP to check that system is 32 bit or 64 bit ?

posted Nov 8, 2013 by Anuj Yadav

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

+2 votes
int main()
{
    int *ptr;
    if (sizeof(ptr) < 8)
        printf("\nThis is 32 Machine \n");
    else
        printf("\nThis is 64 Machine \n");
}
answer Nov 8, 2013 by Vikas Upadhyay
0 votes

1) Using Program
use the pointer size i.e.

sizeof (void *) * CHAR_BIT

to know the size of the machine in C program.

2) To know if PC/Laptop is 64/32bit
http://queryhome.com/11526/32-bit-vs-64-bit-how-to-check-my-pc-have-64-bit-cpu

3) On solaris, use
isainfo -b

answer Nov 8, 2013 by Deepankar Dubey
Similar Questions
+2 votes

I am confused with all 32/64 bit architecture for Hardware/OS/Binary, Can someone please help in clarifying this queries?

  1. Of'course 64 bit hardware is faster than 32 bit, still there are people who prefer 32 bit over 64 bit hardware, Why so?
  2. If I have 32 bit Hardware then On that can I run 64 bit OS? (and vice versa)
  3. If I have a 64 bit Hardware and 32 bit OS then what will be the speed of my OS, as per 32 bit or as per 64 bit? (and vice versa)
  4. If I have 32 bit OS then can I run binary of 64 bit on that? (and vice versa)
  5. Is it necessary to compile binary with 32/64 bit both or we can compile with any and use it in both?
  6. Is the speed of the process also depends on type of binary that I have? For example, If I have 64 bit hardware and 64 bit OS but I have a binary which is compiled with 32 bit compiler then what will be the speed difference?

P.S. I know its basic and silly queries but lets clear now before it gets too late. :)

+5 votes

I want to know my laptop have 32 bit or 64 bit CPU not the OS type which can be seen from computer -> properties. Can it be possible to install window 7 64 bit on a 32 bit machine ?

+2 votes

There is some question regarding export import please help me.
1. how to export and import mongo db 32 bit to 64 bit?
2. after importing is anything goes wrong with files,images?
3. according 64 structure it will accept 32 bit data or not?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...