Interview Questions and Answers :: Cisco
Home > Experience Archives > Cisco > Interview Question Set 2 > Discussion
3. How to find whether a machine is 32bit or 64 bit? Write code for this..??
Answer:
void Is32BitsOr46Bits()
{
char word = 1;
if((*(char *)& word) == 1 )
printf(“\n Machine is 32 bitsâ€);
else
printf(“\n Machine is 64 bitsâ€);
}
Amrita Sinha
10 Sep, 2016 3:00 AM
void Is32BitsOr46Bits()
{
char word = 1;
if((*(char *)& word) == 1 )
printf(“\n Machine is 32 bitsâ€);
else
printf(“\n Machine is 64 bitsâ€);
}
{
char word = 1;
if((*(char *)& word) == 1 )
printf(“\n Machine is 32 bitsâ€);
else
printf(“\n Machine is 64 bitsâ€);
}
Report Error
Report Error
Please Login First Click Here