English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need a program to find out weather the machine is 64bit or 32bit programmatically it can be in C

2007-01-17 20:45:57 · 1 answers · asked by ridha406 1 in Computers & Internet Software

1 answers

i'm not sure but let's try with u!
#include
int main(void){
printf("Lets' check");
printf("char:%3u byte\n", sizeof(char));
printf("int:%3u byte\n", sizeof(int));
printf("float:%3u byte\n", sizeof(float));
return 0;
}

and check for int option return value if it is 4bytes than ur system is 32bit and if it is 8bytes than the system is 64bit.
Tip:: If u r using EM64T system, then there must be an option in BIOS to enable and disable extended 64 bits. Try to play with this option when running this progarm.

2007-01-17 21:06:07 · answer #1 · answered by iMaXX 4 · 0 0

fedest.com, questions and answers