Hi! I am using sizeof operator in my c code.
I have been through the thread "C51: INCORRECT OPERATION OF PRINTF AND SIZEOF".I tried the same.But it shows size of 'short int' as well as 'int' as 2 bytes & sizes of 'double' & 'long double' data types as 4 bytes only.Is their any thing else needs to be done to get the correct data size?
I am using Uvision 8.10.Could you please look in to the problem? Thanks in advance.
"I have been through the thread "C51: INCORRECT OPERATION OF PRINTF AND SIZEOF".I tried the same."
A link, please.
"But it shows size of 'short int' as well as 'int' as 2 bytes & sizes of 'double' & 'long double' data types as 4 bytes only.Is their any thing else needs to be done to get the correct data size?"
Were those results wrong?
Yes!
You need to read this: http://www.keil.com/support/man/docs/c51/c51_ap_datastorage.htm
Is their any thing else needs to be done to get the correct data size?
Whatever makes you believe that these are not the correct data sizes already?
I am using Uvision 8.10.
No, you aren't. Because there is no such program. There's C51 8.10, and there's uVision 3.something.