C++ sizeof – Evaluated at Compilation or Runtime?

c++compile-timeruntimesizeof

For example result of this code snippet depends on which machine: the compiler machine or the machine executable file works?

sizeof(short int)

Best Answer

sizeof is a compile time operator.

Related Question