I am currently learning C Programming ( my first programming language ).
I am a little bit confused with the operators precedence.
Arithmetic operators precedence are as follows.
*/%+-
This is what is given in my book at least.
What i am confused is about how do i go solving expressions when it comes to my theory exams ?
I tried solving many expressing with the order given above but fail to get a correct answer.
Given the following definitions:
int a = 10, b = 20, c;
How would we solve this expression?
a + 4/6 * 6/2
This is an example in my book.
Note that
4/6evaluates to0as integer division is used.