[Example 1] Program
The sample code:
#include <stdio.h> #define TEST1 1 << 0 #define TEST2 (1 << 0) #define TEST3 1 int main() { printf("%#x \n", TEST1 + 4); printf("%#x \n", TEST2 + 4); printf("%#x \n", TEST3 + 4); return 0; } /* 0x10 0x5 0x5 */
Above.
[2] summary
Operator (<< and +) of different priorities, the results may lead to differences.
Seek truth from facts, according to local conditions, specific conditions.
Good Good Study, Day Day Up.
Select the cycle order summary