The associativity of which of the following operators is Left to Right, in C++ ?
In C++ the postfix operators, including array subscripting a[i], group from left to right, so a[i][j] is read as (a[i])[j]. Unary operators such as logical not (!), unary…
Choose your answer
The associativity of which of the following operators is Left to Right, in C++ ?
Answer and explanation
Correct answer C
In C++ the postfix operators, including array subscripting a[i], group from left to right, so a[i][j] is read as (a[i])[j]. Unary operators such as logical not (!), unary minus and address-of (&) group from right to left, which is why !!x is read as !(!x).
Practice for these exams
-
UGC NET Computer Science and Applications