A&= b is a = a &;; B, a+=b is a = a+B.
& is a pointer type. Is to take the address symbol, the above formula means to assign the address of B to A, or A points to B.
For example:
int b = 1; int a & amp= b;
The meaning of this definition is to give B another name A, and all operations on B directly affect A. ..
A&= b means a = a &;; b? Where & is a bitwise AND operation.
Int * a = NULL// Defines a pointer, where a points to 0x00000000.
int b = 3; //Define an int variable, assuming the address is 0x00000 100.
a = & ampb; //At this time, A points to 0x00000 100.
Extended data:
& use:
1, the default symbol, is used to indicate the existence of characters (special characters) in HTML or SGML documents.
2. In a spreadsheet program, an operator used to insert text into a formula describing the relationship between cells.
Stands for and in English, and can also be pronounced as and.
The pronunciation of this word is "z'da".
5. & There is also the meaning of "combination". Such as "A &;; Company B is a merger of Company A and Company B. ..
6. In some computer languages, such as java, it means bitwise AND operation.
7. English spelling: and symbols.
8. Address fetching symbols in high-level languages, such as "int a = 0;; int * p; P =&A; " Point the address of the variable a to the pointer p.
9. Two&in C language; & stANDs for and operation.
For example, while(a = = 9 &;; & ampB==5) means that when A equals 9 and B equals 5, the condition holds.
10,Matlab,&; Stands for AND operation (correspondingly, | stands for or operation), but in a higher version of Matlab (such as Matlab R2008b), it is also recognized how to write &.
In the above sense, items 3 and 5 are the most commonly used.
1 1. In the vfp database,&; Is a macro replacement function that replaces &; And variable names.
12, expressed in Pascal,&; Is the prefix of octal integer constants, such as&; 7 means 7,&; 17 means 15. 177 means 127.
13。 It has also been widely introduced into artistic creation and design.
14 and commands in bat,&; After that, regardless of whether the command is successful or not, multiple commands will be executed in turn.
15. When using command buttons in Visual Basic, (&; Letter) means to set letters as shortcut keys.
For example, enter OK in the Title attribute of the command button. K) "means that k is the shortcut key for the OK event.
16 for identification. Declaring method referenced in C++: type identifier &; Reference name = target variable name. This is not an address operation, but a recognition function.
Bitwise AND operator (&; ):
Operation rule: 0&; 0=0; ? 0 & amp 1=0; 1。 0=0; 1。 1= 1;
That is, if both digits are "1", the result is "1", otherwise it is 0.
For example: 3&; 5? That is 00000011&; 0000 0 10 1 = 0000000 1? Therefore, 3&; The value of 5 is 1.
In addition, negative numbers participate in bitwise AND operation in the form of complement.
Special purpose and operation:
(1) reset. If you want to clear a cell, even if all its binary bits are 0, as long as it is combined with a value of 0, the result is 0.
(2) take a number to locate.
References:
Baidu Encyclopedia-&(Logical Language)
References:
Baidu encyclopedia -C++