Why sizeof() is considered as a special operator and not as a function??
Why sizeof() is considered as a special operator and not as a function??
Regards,
Saswat Dash
Because sizeof() any variable, has to be known at compile time. That would be my guess.
There is only one thing it has in common with function and that is that the syntax can sometimes be the same. Everything else about it is completely different.
It is like asking why a beaver is not considered to be a fish.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"