Tuesday, July 28, 2009

What is the code for sizeof() function/operator?

write the code using 'C' language..

What is the code for sizeof() function/operator?
there is no "code" for it. The compiler evaluates it at the compile time, and replaces with the actual number.


There is no way to write a function that would did that at run time, because at run time, there is not type information available - only addresses of variables not their sizes


No comments:

Post a Comment