please clear my doubt related to their size in the memory ?
Diff bw int, long int and long long int
Hello @ankitdelhi20
1.On major 32-bit platforms:
- int is 32 bits
- long is 32 bits as well
- long long is 64 bits
- On major 64-bit platforms:
- int is 32 bits
- long is either 32 or 64 bits
- long long is 64 bits as well
- Going by the standard:
- int must be at least 16 bits
- long must be at least 32 bits
- long long must be at least 64 bits
Bsically, long is guaranteed at least 32 bits. and long long is guaranteed at least 64 bits.
To understand this better, run the following program:
Hope, this would help.
Give a like, if you are satisfied.