Hey how do u find out whether you have a 32bit or 64bit machine easily.
I am currently running ubuntu btw.
I ask because this program:
Code:
int main ()
{
unsigned long long int test;
test = 0xFFFFFFFF;
/* i get a warning if i make store a larger value */
/* although it does display the larger value (from the printf) */
printf( "%lld\n", test );
printf( "sizeof( unsigned long long int ) = %d\n", sizeof(unsigned long long int) );
printf( "sizeof( long int ) = %d\n", sizeof(long int) );
printf( "sizeof( double ) = %d\n", sizeof(double) );
printf( "sizeof( char ) = %d\n", sizeof(char) );
printf( "sizeof( int ) = %d\n", sizeof(int) );
return 1;
}
has been giving me this output:
4294967295
sizeof( unsigned long long int ) = 8
sizeof( long int ) = 4
sizeof( double ) = 8
sizeof( char ) = 1
sizeof( int ) = 4
any ideas why the 'long int' and 'int' have the same size?
and why even thoe the long long int is 8 bytes = 64 bits i can't/warns me not to store values greater then 0xFFFFFFFF?
Thanks Nick