# C symbol List

Source: Internet
Author: User
Tags bool
List of c‧ symbols

Mathematical Symbols:

 Symbols Explain Example + Plus or positive A = 1 + 2;//Results A = 3A =-5;b = +a;//Results b = 5 - Minus or negative value A = 3-1;//results A = 2A = 5;b =-a;//Fruit b =-5; * Multiplication A = 2 * 3;//Results A = 6 / Except A = 6/2;//results A = 3 % Remainder A = 7 2;//results A = 1, 7 divided by 2, except 1 is the remainder ++ Original value plus 1 A = 1;b = ++a-5;//a plus 1 and then minus 5.b = a++-5;//a minus 5 and then 1. -- The original value minus 1 A = 10;b =--a + 5;//a minus 1 and then 5.b = a--+ 5;//A first plus 5 minus 1.

sentence break:

 Symbols Explain Example > Greater than if (a > B)//If A is greater than B{} >= Greater than or equal to if (a >= b)//If a is greater than or equal to B{} < Less than if (a < b)//If A is less than B{} <= Less than or equal to if (a <= b)//If a is less than or equal to B{} == Equal if (a = = B)//If A and B are equal{} != Not equal if (A! = b)//If A and B are not equal{}

bit symbol:

 Symbols Explain Example ! No if (! ( A > B))//if not a greater than B, the Bollinger bands are used{} && And if (a > B && C > D)//If a > B and C is greater than D, the Bollinger bands are used{} || Or if (a > B | | c > D)//If a > B or C is greater than D, the Bollinger bands are used{} True Really BOOL B = true;//Set a = Trueif (b = = true)//If A is true, the Bollinger value is used{} False False BOOL B = false;//If a = Falseif (b = = false)//If A is false, the Bollinger value is used{} ~ Not Reverse the bit patches for each bit, two-bit useint a = 5; Two-bit 00000000000000000000000000000101int b = ~a;Results B is equal to the second 11111111111111111111111111111010 & and Two-position and bit-element use, the dual-azimuth element is 1, the result is 1int a = 10;//a is equal to two bits 1010int b = 12;//b equal to two-1100int c = A & b;//c equal to two 1000 | OR Two bits and bits are used, only one bit is 1, which results in 1int a = 10;//a is equal to two bits 1010int b = 12;//b equal to two-1100int c = A | B;//C is equal to the second level 1110 ^ Xor Two-position and bit-element use, the dual-azimuth element is 0, the result is 1int a = 10;//a is equal to two bits 1010int b = 12;//b equal to two-1100int c = A | B;//C is equal to the second level 0110 << Move left Binary and bit use, bit left-shifted 0int a = 10;//a is equal to two bits 1010A = a << 1;//a are equal to two 10100, a is equal to 20Shift 1 per left to indicate the number multiplied by 2 >> Move right Binary and bit use, bit right shift 0int a = 10;//a is equal to two bits 1010A = a >> 1;//a are equal to two 0101, A is equal to 5Every left shift is 1, which means the number is divided by 2, and the decimal point is no more.

specified symbol:

 Symbols Explain Example = As A = 1; += Plus is equal to A + = 1;//is a = a + 1; -= Minus equal to A-= 1;//is a = A-1; *= The multiplication is equal to A *= 1;//is a = a * 2; /= Except for A/= 1;//is a = A/2; %= The remainder is equal to A%= 1;//is a = a% 2; ?? Value type can be null Normally, value type values cannot be set to NULLInt? A = null;//Such a declaration can beint b = a?? -1;//if a equals null then B equals-1, or B = a &= And so on A &= 1;//is a = A & 2; , two-bit use, the reference bit symbol |= or equal to A |= 1;//is a = a | 2., two-bit use, the reference bit symbol is stated ^= XOR is equal to A ^= 1;//is a = a ^ 2;, two-bit use, the reference bit symbol <<= Left SHIFT, etc. A <<= 1;//is a = a << 2, and the second is used, the reference bit symbol is stated >>= Right-shift to a >>= 1;//is a = a << 2;, two-bit use, the reference bit symbol says
Related Keywords:

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.