Hai can anyone give the information abt sizeof... how to sizeof operatot exactly in 8051 family
There is nothing peculiar about sizeof in C51; it works as standard ANSI 'C' - therefore you should find the necessary information any 'C' textbook.
eg:
http://www.keil.com/books/
http://c-faq.com/
publications.gbdirect.co.uk/.../
There is nothing peculiar about sizeof in C51; it works as standard ANSI 'C'
There is an exception: In standard 'C' the result of sizeof is always a size_t, whereas in C51 the result may or may not be a size_t depending in its value.
It may not sound particularly important but can cause some surprises with variadic functions in particular.
Does that depend on whether the standard Integer Promotions are enabled or not...?
No, C51 always treats an integer constant as an 8 bit value if it will fit into one. The 'integer promotions' or whatever Keil calls them only apply to operator operands not to variadic function arguments. If I remember correctly the position with non-prototyped non-variadic functions is unimportant as the compiler simply won't accept them.
It's safest to always qualify constants at the point of definition and to cast constants when passing them to variadic functions unless you have a good reason not to do so.
The documentation of these issues is scant as best and I don't think they are mentioned in their published 'differences from ISO C', which is pretty poor show.