On my Solaris 10 update 9 system, the following command gives:
64
But if I create the following program in C with restrictions. h is on, I get:
#include <stdio.h>
#include <limits.h>
int main(void)
{
printf("Maximum integer value on this system is = %d\n", INT_MAX);
}
gcc on64.c -o on64
./on64
Maximum integer value on this system is = 2147483647
I expected a much larger result, because the system runs on 64 bits. This looks like a 32 bit result. Is this a compiler problem?
source
share