user-0 提问: c中的疑惑

回复:
user: user-1
content: #define LCM(len) ((1 << LCM_TAG_SHI)| len) #include <stdio.h> int LCM_TAG_SHI; int L; int main() {     for (LCM_TAG_SHI=0;LCM_TAG_SHI<32;LCM_TAG_SHI+=2) {         printf("LCM_TAG_SHI==%d:\n",LCM_TAG_SHI);         for (L=0;L<0x1000;L+=0x100) {             printf("LCM(0x%08x)==0x%08x\n",L,LCM(L));         }         printf("\n");     }     return 0; } //LCM_TAG_SHI==0: //LCM(0x00000000)==0x00000001 //LCM(0x00000100)==0x00000101 //LCM(0x00000200)==0x00000201 //LCM(0x00000300)==0x00000301 //LCM(0x00000400)==0x00000401 //LCM(0x00000500)==0x00000501 //LCM(0x00000600)==0x00000601 //LCM(0x00000700)==0x00000701 //LCM(0x00000800)==0x00000801 //LCM(0x00000900)==0x00000901 //LCM(0x00000a00)==0x00000a01 //LCM(0x00000b00)==0x00000b01 //LCM(0x00000c00)==0x00000c01 //LCM(0x00000d00)==0x00000d01 //LCM(0x00000e00)==0x00000e01 //LCM(0x00000f00)==0x00000f01 // //LCM_TAG_SHI==2: //LCM(0x00000000)==0x00000004 //LCM(0x00000100)==0x00000104 //LCM(0x00000200)==0x00000204 //LCM(0x00000300)==0x00000304 //LCM(0x00000400)==0x00000404 //LCM(0x00000500)==0x00000504 //LCM(0x00000600)==0x00000604 //LCM(0x00000700)==0x00000704 //LCM(0x00000800)==0x00000804 //LCM(0x00000900)==0x00000904 //LCM(0x00000a00)==0x00000a04 //LCM(0x00000b00)==0x00000b04 //LCM(0x00000c00)==0x00000c04 //LCM(0x00000d00)==0x00000d04 //LCM(0x00000e00)==0x00000e04 //LCM(0x00000f00)==0x00000f04 // //LCM_TAG_SHI==4: //LCM(0x00000000)==0x00000010 //LCM(0x00000100)==0x00000110 //LCM(0x00000200)==0x00000210 //LCM(0x00000300)==0x00000310 //LCM(0x00000400)==0x00000410 //LCM(0x00000500)==0x00000510 //LCM(0x00000600)==0x00000610 //LCM(0x00000700)==0x00000710 //LCM(0x00000800)==0x00000810 //LCM(0x00000900)==0x00000910 //LCM(0x00000a00)==0x00000a10 //LCM(0x00000b00)==0x00000b10 //LCM(0x00000c00)==0x00000c10 //LCM(0x00000d00)==0x00000d10 //LCM(0x00000e00)==0x00000e10 //LCM(0x00000f00)==0x00000f10 // //LCM_TAG_SHI==6: //LCM(0x00000000)==0x00000040 //LCM(0x00000100)==0x00000140 //LCM(0x00000200)==0x00000240 //LCM(0x00000300)==0x00000340 //LCM(0x00000400)==0x00000440 //LCM(0x00000500)==0x00000540 //LCM(0x00000600)==0x00000640 //LCM(0x00000700)==0x00000740 //LCM(0x00000800)==0x00000840 //LCM(0x00000900)==0x00000940 //LCM(0x00000a00)==0x00000a40 //LCM(0x00000b00)==0x00000b40 //LCM(0x00000c00)==0x00000c40 //LCM(0x00000d00)==0x00000d40 //LCM(0x00000e00)==0x00000e40 //LCM(0x00000f00)==0x00000f40 // //LCM_TAG_SHI==8: //LCM(0x00000000)==0x00000100 //LCM(0x00000100)==0x00000100 //LCM(0x00000200)==0x00000300 //LCM(0x00000300)==0x00000300 //LCM(0x00000400)==0x00000500 //LCM(0x00000500)==0x00000500 //LCM(0x00000600)==0x00000700 //LCM(0x00000700)==0x00000700 //LCM(0x00000800)==0x00000900 //LCM(0x00000900)==0x00000900 //LCM(0x00000a00)==0x00000b00 //LCM(0x00000b00)==0x00000b00 //LCM(0x00000c00)==0x00000d00 //LCM(0x00000d00)==0x00000d00 //LCM(0x00000e00)==0x00000f00 //LCM(0x00000f00)==0x00000f00 // //LCM_TAG_SHI==10: //LCM(0x00000000)==0x00000400 //LCM(0x00000100)==0x00000500 //LCM(0x00000200)==0x00000600 //LCM(0x00000300)==0x00000700 //LCM(0x00000400)==0x00000400 //LCM(0x00000500)==0x00000500 //LCM(0x00000600)==0x00000600 //LCM(0x00000700)==0x00000700 //LCM(0x00000800)==0x00000c00 //LCM(0x00000900)==0x00000d00 //LCM(0x00000a00)==0x00000e00 //LCM(0x00000b00)==0x00000f00 //LCM(0x00000c00)==0x00000c00 //LCM(0x00000d00)==0x00000d00 //LCM(0x00000e00)==0x00000e00 //LCM(0x00000f00)==0x00000f00 // //LCM_TAG_SHI==12: //LCM(0x00000000)==0x00001000 //LCM(0x00000100)==0x00001100 //LCM(0x00000200)==0x00001200 //LCM(0x00000300)==0x00001300 //LCM(0x00000400)==0x00001400 //LCM(0x00000500)==0x00001500 //LCM(0x00000600)==0x00001600 //LCM(0x00000700)==0x00001700 //LCM(0x00000800)==0x00001800 //LCM(0x00000900)==0x00001900 //LCM(0x00000a00)==0x00001a00 //LCM(0x00000b00)==0x00001b00 //LCM(0x00000c00)==0x00001c00 //LCM(0x00000d00)==0x00001d00 //LCM(0x00000e00)==0x00001e00 //LCM(0x00000f00)==0x00001f00 // //LCM_TAG_SHI==14: //LCM(0x00000000)==0x00004000 //LCM(0x00000100)==0x00004100 //LCM(0x00000200)==0x00004200 //LCM(0x00000300)==0x00004300 //LCM(0x00000400)==0x00004400 //LCM(0x00000500)==0x00004500 //LCM(0x00000600)==0x00004600 //LCM(0x00000700)==0x00004700 //LCM(0x00000800)==0x00004800 //LCM(0x00000900)==0x00004900 //LCM(0x00000a00)==0x00004a00 //LCM(0x00000b00)==0x00004b00 //LCM(0x00000c00)==0x00004c00 //LCM(0x00000d00)==0x00004d00 //LCM(0x00000e00)==0x00004e00 //LCM(0x00000f00)==0x00004f00 // //LCM_TAG_SHI==16: //LCM(0x00000000)==0x00010000 //LCM(0x00000100)==0x00010100 //LCM(0x00000200)==0x00010200 //LCM(0x00000300)==0x00010300 //LCM(0x00000400)==0x00010400 //LCM(0x00000500)==0x00010500 //LCM(0x00000600)==0x00010600 //LCM(0x00000700)==0x00010700 //LCM(0x00000800)==0x00010800 //LCM(0x00000900)==0x00010900 //LCM(0x00000a00)==0x00010a00 //LCM(0x00000b00)==0x00010b00 //LCM(0x00000c00)==0x00010c00 //LCM(0x00000d00)==0x00010d00 //LCM(0x00000e00)==0x00010e00 //LCM(0x00000f00)==0x00010f00 // //LCM_TAG_SHI==18: //LCM(0x00000000)==0x00040000 //LCM(0x00000100)==0x00040100 //LCM(0x00000200)==0x00040200 //LCM(0x00000300)==0x00040300 //LCM(0x00000400)==0x00040400 //LCM(0x00000500)==0x00040500 //LCM(0x00000600)==0x00040600 //LCM(0x00000700)==0x00040700 //LCM(0x00000800)==0x00040800 //LCM(0x00000900)==0x00040900 //LCM(0x00000a00)==0x00040a00 //LCM(0x00000b00)==0x00040b00 //LCM(0x00000c00)==0x00040c00 //LCM(0x00000d00)==0x00040d00 //LCM(0x00000e00)==0x00040e00 //LCM(0x00000f00)==0x00040f00 // //LCM_TAG_SHI==20: //LCM(0x00000000)==0x00100000 //LCM(0x00000100)==0x00100100 //LCM(0x00000200)==0x00100200 //LCM(0x00000300)==0x00100300 //LCM(0x00000400)==0x00100400 //LCM(0x00000500)==0x00100500 //LCM(0x00000600)==0x00100600 //LCM(0x00000700)==0x00100700 //LCM(0x00000800)==0x00100800 //LCM(0x00000900)==0x00100900 //LCM(0x00000a00)==0x00100a00 //LCM(0x00000b00)==0x00100b00 //LCM(0x00000c00)==0x00100c00 //LCM(0x00000d00)==0x00100d00 //LCM(0x00000e00)==0x00100e00 //LCM(0x00000f00)==0x00100f00 // //LCM_TAG_SHI==22: //LCM(0x00000000)==0x00400000 //LCM(0x00000100)==0x00400100 //LCM(0x00000200)==0x00400200 //LCM(0x00000300)==0x00400300 //LCM(0x00000400)==0x00400400 //LCM(0x00000500)==0x00400500 //LCM(0x00000600)==0x00400600 //LCM(0x00000700)==0x00400700 //LCM(0x00000800)==0x00400800 //LCM(0x00000900)==0x00400900 //LCM(0x00000a00)==0x00400a00 //LCM(0x00000b00)==0x00400b00 //LCM(0x00000c00)==0x00400c00 //LCM(0x00000d00)==0x00400d00 //LCM(0x00000e00)==0x00400e00 //LCM(0x00000f00)==0x00400f00 // //LCM_TAG_SHI==24: //LCM(0x00000000)==0x01000000 //LCM(0x00000100)==0x01000100 //LCM(0x00000200)==0x01000200 //LCM(0x00000300)==0x01000300 //LCM(0x00000400)==0x01000400 //LCM(0x00000500)==0x01000500 //LCM(0x00000600)==0x01000600 //LCM(0x00000700)==0x01000700 //LCM(0x00000800)==0x01000800 //LCM(0x00000900)==0x01000900 //LCM(0x00000a00)==0x01000a00 //LCM(0x00000b00)==0x01000b00 //LCM(0x00000c00)==0x01000c00 //LCM(0x00000d00)==0x01000d00 //LCM(0x00000e00)==0x01000e00 //LCM(0x00000f00)==0x01000f00 // //LCM_TAG_SHI==26: //LCM(0x00000000)==0x04000000 //LCM(0x00000100)==0x04000100 //LCM(0x00000200)==0x04000200 //LCM(0x00000300)==0x04000300 //LCM(0x00000400)==0x04000400 //LCM(0x00000500)==0x04000500 //LCM(0x00000600)==0x04000600 //LCM(0x00000700)==0x04000700 //LCM(0x00000800)==0x04000800 //LCM(0x00000900)==0x04000900 //LCM(0x00000a00)==0x04000a00 //LCM(0x00000b00)==0x04000b00 //LCM(0x00000c00)==0x04000c00 //LCM(0x00000d00)==0x04000d00 //LCM(0x00000e00)==0x04000e00 //LCM(0x00000f00)==0x04000f00 // //LCM_TAG_SHI==28: //LCM(0x00000000)==0x10000000 //LCM(0x00000100)==0x10000100 //LCM(0x00000200)==0x10000200 //LCM(0x00000300)==0x10000300 //LCM(0x00000400)==0x10000400 //LCM(0x00000500)==0x10000500 //LCM(0x00000600)==0x10000600 //LCM(0x00000700)==0x10000700 //LCM(0x00000800)==0x10000800 //LCM(0x00000900)==0x10000900 //LCM(0x00000a00)==0x10000a00 //LCM(0x00000b00)==0x10000b00 //LCM(0x00000c00)==0x10000c00 //LCM(0x00000d00)==0x10000d00 //LCM(0x00000e00)==0x10000e00 //LCM(0x00000f00)==0x10000f00 // //LCM_TAG_SHI==30: //LCM(0x00000000)==0x40000000 //LCM(0x00000100)==0x40000100 //LCM(0x00000200)==0x40000200 //LCM(0x00000300)==0x40000300 //LCM(0x00000400)==0x40000400 //LCM(0x00000500)==0x40000500 //LCM(0x00000600)==0x40000600 //LCM(0x00000700)==0x40000700 //LCM(0x00000800)==0x40000800 //LCM(0x00000900)==0x40000900 //LCM(0x00000a00)==0x40000a00 //LCM(0x00000b00)==0x40000b00 //LCM(0x00000c00)==0x40000c00 //LCM(0x00000d00)==0x40000d00 //LCM(0x00000e00)==0x40000e00 //LCM(0x00000f00)==0x40000f00 //

user: user-0
content: 引用 1 楼 zhao4zhong1 的回复://C++ Operators //  Operators specify an evaluation to be performed on one of the following: //    One operand (unary operator) //    Two operands (binary operator) //    Three operands (ternary operator) //  The C++ language includes all C operators and adds several new operators. //  Table 1.1 lists the operators available in Microsoft C++. //  Operators follow a strict precedence which defines the evaluation order of //expressions containing these operators.  Operators associate with either the //expression on their left or the expression on their right;    this is called //“associativity.” Operators in the same group have equal precedence and are //evaluated left to right in an expression unless explicitly forced by a pair of //parentheses, ( ). //  Table 1.1 shows the precedence and associativity of C++ operators //  (from highest to lowest precedence). // //Table 1.1   C++ Operator Precedence and Associativity // The highest precedence level is at the top of the table. //+------------------+-----------------------------------------+---------------+ //| Operator         | Name or Meaning                         | Associativity | //+------------------+-----------------------------------------+---------------+ //| ::               | Scope resolution                        | None          | //| ::               | Global                                  | None          | //| [ ]              | Array subscript                         | Left to right | //| ( )              | Function call                           | Left to right | //| ( )              | Conversion                              | None          | //| .                | Member selection (object)               | Left to right | //| ->               | Member selection (pointer)              | Left to right | //| ++               | Postfix increment                       | None          | //| --               | Postfix decrement                       | None          | //| new              | Allocate object                         | None          | //| delete           | Deallocate object                       | None          | //| delete[ ]        | Deallocate object                       | None          | //| ++               | Prefix increment                        | None          | //| --               | Prefix decrement                        | None          | //| *                | Dereference                             | None          | //| &                | Address-of                              | None          | //| +                | Unary plus                              | None          | //| -                | Arithmetic negation (unary)             | None          | //| !                | Logical NOT                             | None          | //| ~                | Bitwise complement                      | None          | //| sizeof           | Size of object                          | None          | //| sizeof ( )       | Size of type                            | None          | //| typeid( )        | type name                               | None          | //| (type)           | Type cast (conversion)                  | Right to left | //| const_cast       | Type cast (conversion)                  | None          | //| dynamic_cast     | Type cast (conversion)                  | None          | //| reinterpret_cast | Type cast (conversion)                  | None          | //| static_cast      | Type cast (conversion)                  | None          | //| .*               | Apply pointer to class member (objects) | Left to right | //| ->*              | Dereference pointer to class member     | Left to right | //| *                | Multiplication                          | Left to right | //| /                | Division                                | Left to right | //| %                | Remainder (modulus)                     | Left to right | //| +                | Addition                                | Left to right | //| -                | Subtraction                             | Left to right | //| <<               | Left shift                              | Left to right | //| >>               | Right shift                             | Left to right | //| <                | Less than                               | Left to right | //| >                | Greater than                            | Left to right | //| <=               | Less than or equal to                   | Left to right | //| >=               | Greater than or equal to                | Left to right | //| ==               | Equality                                | Left to right | //| !=               | Inequality                              | Left to right | //| &                | Bitwise AND                             | Left to right | //| ^                | Bitwise exclusive OR                    | Left to right | //| |                | Bitwise OR                              | Left to right | //| &&               | Logical AND                             | Left to right | //| ||               | Logical OR                              | Left to right | //| e1?e2:e3         | Conditional                             | Right to left | //| =                | Assignment                              | Right to left | //| *=               | Multiplication assignment               | Right to left | //| /=               | Division assignment                     | Right to left | //| %=               | Modulus assignment                      | Right to left | //| +=               | Addition assignment                     | Right to left | //| -=               | Subtraction assignment                  | Right to left | //| <<=              | Left-shift assignment                   | Right to left | //| >>=              | Right-shift assignment                  | Right to left | //| &=               | Bitwise AND assignment                  | Right to left | //| |=               | Bitwise inclusive OR assignment         | Right to left | //| ^=               | Bitwise exclusive OR assignment         | Right to left | //| ,                | Comma                                   | Left to right | //+------------------+-----------------------------------------+---------------+   |                | Bitwise OR                              | Left to right 您是指我的那个属于这个？那我的完整的意思是什么呢，能麻烦您告知吗

user: user-1
content: //C++ Operators //  Operators specify an evaluation to be performed on one of the following: //    One operand (unary operator) //    Two operands (binary operator) //    Three operands (ternary operator) //  The C++ language includes all C operators and adds several new operators. //  Table 1.1 lists the operators available in Microsoft C++. //  Operators follow a strict precedence which defines the evaluation order of //expressions containing these operators.  Operators associate with either the //expression on their left or the expression on their right;    this is called //“associativity.” Operators in the same group have equal precedence and are //evaluated left to right in an expression unless explicitly forced by a pair of //parentheses, ( ). //  Table 1.1 shows the precedence and associativity of C++ operators //  (from highest to lowest precedence). // //Table 1.1   C++ Operator Precedence and Associativity // The highest precedence level is at the top of the table. //+------------------+-----------------------------------------+---------------+ //| Operator         | Name or Meaning                         | Associativity | //+------------------+-----------------------------------------+---------------+ //| ::               | Scope resolution                        | None          | //| ::               | Global                                  | None          | //| [ ]              | Array subscript                         | Left to right | //| ( )              | Function call                           | Left to right | //| ( )              | Conversion                              | None          | //| .                | Member selection (object)               | Left to right | //| ->               | Member selection (pointer)              | Left to right | //| ++               | Postfix increment                       | None          | //| --               | Postfix decrement                       | None          | //| new              | Allocate object                         | None          | //| delete           | Deallocate object                       | None          | //| delete[ ]        | Deallocate object                       | None          | //| ++               | Prefix increment                        | None          | //| --               | Prefix decrement                        | None          | //| *                | Dereference                             | None          | //| &                | Address-of                              | None          | //| +                | Unary plus                              | None          | //| -                | Arithmetic negation (unary)             | None          | //| !                | Logical NOT                             | None          | //| ~                | Bitwise complement                      | None          | //| sizeof           | Size of object                          | None          | //| sizeof ( )       | Size of type                            | None          | //| typeid( )        | type name                               | None          | //| (type)           | Type cast (conversion)                  | Right to left | //| const_cast       | Type cast (conversion)                  | None          | //| dynamic_cast     | Type cast (conversion)                  | None          | //| reinterpret_cast | Type cast (conversion)                  | None          | //| static_cast      | Type cast (conversion)                  | None          | //| .*               | Apply pointer to class member (objects) | Left to right | //| ->*              | Dereference pointer to class member     | Left to right | //| *                | Multiplication                          | Left to right | //| /                | Division                                | Left to right | //| %                | Remainder (modulus)                     | Left to right | //| +                | Addition                                | Left to right | //| -                | Subtraction                             | Left to right | //| <<               | Left shift                              | Left to right | //| >>               | Right shift                             | Left to right | //| <                | Less than                               | Left to right | //| >                | Greater than                            | Left to right | //| <=               | Less than or equal to                   | Left to right | //| >=               | Greater than or equal to                | Left to right | //| ==               | Equality                                | Left to right | //| !=               | Inequality                              | Left to right | //| &                | Bitwise AND                             | Left to right | //| ^                | Bitwise exclusive OR                    | Left to right | //| |                | Bitwise OR                              | Left to right | //| &&               | Logical AND                             | Left to right | //| ||               | Logical OR                              | Left to right | //| e1?e2:e3         | Conditional                             | Right to left | //| =                | Assignment                              | Right to left | //| *=               | Multiplication assignment               | Right to left | //| /=               | Division assignment                     | Right to left | //| %=               | Modulus assignment                      | Right to left | //| +=               | Addition assignment                     | Right to left | //| -=               | Subtraction assignment                  | Right to left | //| <<=              | Left-shift assignment                   | Right to left | //| >>=              | Right-shift assignment                  | Right to left | //| &=               | Bitwise AND assignment                  | Right to left | //| |=               | Bitwise inclusive OR assignment         | Right to left | //| ^=               | Bitwise exclusive OR assignment         | Right to left | //| ,                | Comma                                   | Left to right | //+------------------+-----------------------------------------+---------------+