Strange sizeof

xiaoxiao2021-03-06  49

For Sizeof, I want everyone to be very familiar;

such as:

Printf ("SIZEOF INT:% D / N", SIZEOF (INT));

// Here INT is defined as: typedef int int.

Well, the result is:

SIZEOF INT: 4;

If I write this, I have dropped SIZEO's parentheses:

Printf ("SIZEOF INT:% D / N", SIZEOF INT);

Of course, the result is still the same;

But if I write this:

Printf ("SIZEOF INT:% D / N", SIZEOF INT);

But cause compilation that cannot be passed, two keywords put a compiler, don't know? And it is equivalent to the VC and GCC, and it is true ~

转载请注明原文地址:https://www.9cbs.com/read-81193.html

New Post(0)