In C (also C++), how '&' operator works as both address operator and bitwise operator ? As operator overloading is not supported by C
问题 The operator '&' can be used in both of following way int a; scanf("%d",&a); and printf("%d",1&2) . But different behaviour (for first as address operator and second time as bit-wise operator). I know operator overloading is not there in C. Then how it works ?. Also highlight for c++. 回答1: In "C" language, operators have different meaning when they are used as prefix to expression, suffix to expression or "infix" (between two expressions). Consider '*', which performs multiplication as 'infix