Operator Priority in the C Programming Language and other stuff

Operator Priority in the C Programming Language and other stuff

PrioritySymbol
1++
1
1()
2!
2(typecast)
3*
3/
3%
4+
4
5<, <=
5>, >=
6==, !=
7&&
8||
9all assignment operators

One restriction on the switch expression is that it must evaluate to an integral type (intcharshortlonglong long, or enum).

Ternary operators instead of if / then / else: condition ? do something : do something else;

Leave a Reply

Your email address will not be published. Required fields are marked *