This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sizeof operator gives wrong output with printf for some data types

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.

0