Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What does & mean in C language?
What does & mean in C language?
There may be two operators in & ampC language.

1. If there is only one operand and it is the right operand, then &; Is the address operator, and the result is the address of the operation object. For example & A (assuming that a is a left value, that is, there is a specific accessible address) is originally the address of A.

2. If there are two operands, then &; Represents a bitwise AND operation. Each binary bit in the result is equal to the bitwise sum of the binary bits in the corresponding positions of the two operands. The bitwise AND operation of each bit is 1 if and only if the operands are all 1&, and the result is1; 1 == 1, 1。 0 = = 0 & amp 1 == 0。 0 == 0。

C language operation symbol type:

1, arithmetic operator

Used for various numerical operations. Including addition (+), subtraction (-), multiplication (*), division (/), remainder (or modular operation,%), self-increasing (++) and self-decreasing (-) * *.

2. Relational operators

Used for comparison operations. Include greater than (>), less than (=), less than or equal to (

3. Logical operators

Used for logical operations. Including using (&; &), or (||), not (! ) three kinds.

4, bit operator

The quantities involved in the operation are calculated by binary bits. Includes a bit sum (&; ), bitwise OR (|), bitwise NOT (~), bitwise XOR () and left shift (>).

5. Assignment operator

Used for assignment operation, which is divided into simple assignment (=), compound arithmetic assignment (+=,-=, * =,/=,% =) and compound bit operation assignment (&; =,|=,^=,>; & gt=,<& lt=) There are three kinds of * * * eleven kinds.

6. Conditional operators

This is a three-eye operator used for conditional evaluation (? :)。

7. comma operator

Used to combine several expressions into one expression (,).

8. Pointer operator

Used to obtain content (*) and address (&; ) two operations.

9. Find the number of bytes of the operator

Used to calculate the size of the data type.

10, special operator

There are brackets (), subscripts [], members (→,. ) and so on.

The above contents refer to Baidu Encyclopedia -c language operation symbols.