> what will be the size of data types(long, int, char, short) on a 64-
> bit architecture?
That is insufficient information. "64 bit" may refer to the size of
a *pointer*, not that of an integer. If the architecture had a 32-bit
history, that may affect the design to make upgrading easy.
Mimimum size (pick largest) Maximum size (pick smallest)
char 8 bits size of short
Since Unicode fits in 32 bits without multibyte encoding, it is
unlikely a char is larger than 32 bits.
Lots of stuff will break if char is larger than 8 bits.
short 16 bits size of int
size of char
A lot of networking stuff depends on the existence of a 16-bit type.
(which could be int16_t).
int 16 bits size of long
size of short
int is likely at least 32 bits in any architecture bigger than an Intel 386.
long 32 bits size of long long
size of int
If it's a "64-bit architecture", long is probably at least 64 bits.
long long 64 bits unlimited
size of long probably not more than 128 bits
You might have:
char/short/int/long/long long
8 / 16 / 32 / 64 / 64 or
8 / 16 / 32 / 64 / 128 or
8 / 16 / 64 / 64 / 128 or
8 / 16 / 32 / 32 / 64
Possible, but much less likely (except maybe in digital signal processor
chips), are:
32 / 32 / 32 / 64 / 64
64 / 64 / 64 / 64 / 64
64 / 64 / 64 / 64 / 128