Hi
I don't understand difference between int and long type ?
size of int = 4 bytesCode:#include <stdio.h> int main() { int x = 1; long y = 1; printf("size of int = %d bytes\n", sizeof(x)); printf(" X = %d \n", x); printf("size of long = %d bytes\n", sizeof(y)); printf(" Y = %d \n", y); return 0; }
X = 1
size of long = 4 bytes
Y = 1
gcc compiler allocate 4 bytes for both type int and long and they both store decimal number
What's difference between int and long type ?