-
C does not just process the statements you send it blindly from left to right. It looks at the statements and applies standard rules to the order in which the statements should be processed. For instance, it will do multiplication before addition.
-
There are many more symbols and operations you will learn as you progress with your knowledge of C, but here is a list of the order for the operations we have gone over in this lesson.
-
Looking at the table below, the operations with priority 1 will be performed first. Then priority 2, 3, and so on will be processed. For operators of the same level of priority, they operations occur from left to right.
Priority Symbol
-
++
-
--
-
()
-
!
-
(typecast)
-
*
-
/
-
%
-
+
-
-
-
<, <=
-
>, >=
-
==, !=
-
&&
-
||
-
all assignment operators