0

Size of various data types

What is the size of various data types including signed,unsigned, long and double?

14th Jul 2017, 9:27 AM
Saurav Bandlapalli
Saurav Bandlapalli - avatar
6 Antworten
+ 1
It depends on the compiler and the architecture. Type sizeof(long); etc etc, which will give you the size of that type in bytes.
14th Jul 2017, 9:31 AM
aklex
aklex - avatar
0
thanks aklex
14th Jul 2017, 9:36 AM
Saurav Bandlapalli
Saurav Bandlapalli - avatar
0
yes, it depends on the size and architecture. But usually Signed char is 8 bit (-128 to 127), Unsigned char is 8 bit (0 to 255), double is 64 bit (0 to 64k-1) to long is 32 bit. but there are char like long signed, double Unsigned too.
14th Jul 2017, 9:40 AM
Amit Gupta
Amit Gupta - avatar