internal working of "sizeof()" operator
-
Hi, how does "sizeof" operator works internally? Thanks -Sachin
-
Hi, how does "sizeof" operator works internally? Thanks -Sachin
Did you try a simple Google search[^]?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->ßRÅhmmÃ<-·´¯`·.
-
Did you try a simple Google search[^]?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->ßRÅhmmÃ<-·´¯`·.
I tried that also, but didn't get any solution. -Sachin
-
I tried that also, but didn't get any solution. -Sachin
-
I tried that also, but didn't get any solution. -Sachin
Sachinpatole wrote:
I tried that also, but didn't get any solution.
So google is not your friend.;)
-
Hi, how does "sizeof" operator works internally? Thanks -Sachin
The compiler "knows" the sizes of all types that are native, or have been declared up to that point. It merely substitutes an integer constant in place of the sizeof expression at compile-time. Unless you're talking about reflection or RTTI (run-time type identification), all the size information is known at compile time, so there is no run-time involvement; just a simple substitution. Much like using a #define or a const. Hope this helps. David