‘&’ symbol has two meanings in C and C++.
- Address of Operator: returns address of a variable.
- int a = 3;
- printf(“%d”, a);
- will return value of a: 3
- printf(“%d”, &a);
- will return address of variable a.
- Bit-wise Operator &: operates on bitlevel
- Example:
- int a = 13&4;
- 13 = 1101
- 4 =0100
- 13&4 = 0100
- a = 4
- Example: