Why is the sizeof(int) == sizeof(long)?
问题 In the program listed below, the sizeof(int) and sizeof(long) are equal on my machine (both equal 4 bytes (or 32 bits)). A long, as far as I know, is 8 bytes. Is this correct? I have a 64-bit machine #include <stdio.h> #include <limits.h> int main(void){ printf("sizeof(short) = %d\n", (int)sizeof(short)); printf("sizeof(int) = %d\n", (int)sizeof(int)); printf("sizeof(long) = %d\n", (int)sizeof(long)); printf("sizeof(float) = %d\n", (int)sizeof(float)); printf("sizeof(double) = %d\n", (int