2,228 views
0 votes
0 votes

Hi,

Is there any smart way to learn operator precedence table ? (means can we form some kind of logical connection instead of mugging entire table.) If some good reference could be provided then it will be great help.

PS: http://www.geeksforgeeks.org/c-operator-precedence-associativity/

1 Answer

1 votes
1 votes

Hi Guys,

Please refer -> https://stackoverflow.com/questions/4204973/shortcut-to-remember-the-order-of-evaluation-and-precedence-of-operators-in-c

PUMA IS REBL ( spell "REBL" as if "REBEL"). or PUMA'S REBL TAC (with a puma being a cat and since our cat is a spelling rebel, it writes "cat" backwards)

For Associative All except Unary,Assignment and Ternary are Left to Right.

Related questions

3 votes
3 votes
5 answers
1
arpit.bagri asked Aug 6, 2023
1,044 views
Why is the output of the below program 36? int main(){ int a = 1; int b = ++a * ++a * ++a; printf("%d", b ); ​​​​ return 0; }
0 votes
0 votes
1 answer
4