Both have occupy same memory
That's a wrong statement. Maybe it does on your system, but the C standard does not specify the length of the short int, int and long int data types.
At least two of them need to be different, but it's not specified which one. They may also have different length.
So it's really implementation defined.
EDIT
Here's what the C89 specification says:
'int' and 'short' must be at least 16 bits
and 'long' be at least as long as 'int'
and not smaller than 32 bits.
For instance, on Mac OS X 10.5, short is 16 bits, int 32 bits, and long 32 bits.
Since Mac OS X 10.6, short is 16 bits, int 32 bits, and long 64 bits.