Not sure if this is hardware, software or compiler dependent
$ uname -a
CYGWIN_NT-5.1 machinename 1.7.28(0.271/5/3) 2014-02-09 21:06 i686 Cygwin
On a 32 bit XP SP 3 platform
wrote a small profram to check some parameters;
Received the following Re: Signed and unsigned integers
Quote:
int x = 0xAB78 in decimal format is : 43896
and
unsigned int y = 0xAB78 in decimal format is : 43896
The size of int is 4 bytes
Not quite what I expected, since the leftmost bit in 'int' is 1 and would be the negative flag.
So wrote another for byte sizes and got the following -
Note: size of 'int' and 'long int' are the same, both are 4 bytes longQuote:
The size of short int is 2 bytes
The size of int is 4 bytes
The size of long int is 4 bytes
The size of double is 8 bytes
The size of long double is 12 bytes
Is this to be expected?
Thanks!