S
Shri
How to identify if the given machine is 8/16/32 bit using C code ???
printf("Word length = %d", sizeof(int));
Doesn't that depend on the compiler you are using for compiling that
piece of code??? I think that there are compilers that use 4 bytes
for int irrespective of the underlying hardware ... please correct me
if I am wrong Actually I think to check the bit ness of machine
.... we need to check how much bit processor we are using ... and may
be that we can know if we know the size of the data bus or cpu
registers ... Am I right ??? ... then I suppose sizeof int may not
give compulsorily give the sizeof CPU register ... then how do we
check it using c code???
--Shri
printf("Word length = %d", sizeof(int));
Doesn't that depend on the compiler you are using for compiling that
piece of code??? I think that there are compilers that use 4 bytes
for int irrespective of the underlying hardware ... please correct me
if I am wrong Actually I think to check the bit ness of machine
.... we need to check how much bit processor we are using ... and may
be that we can know if we know the size of the data bus or cpu
registers ... Am I right ??? ... then I suppose sizeof int may not
give compulsorily give the sizeof CPU register ... then how do we
check it using c code???
--Shri