I have been here before but not for a while. I hope my question is in the right section
. I am new to learning C and seem to be picking it up and enjoying it. I am a little confused about how the order of precedence works. I have wrote the following simple program but can't workout how the compiler gets it answer. I have shown my workings using the MDAS rule but i'm stuck. Sorry to all the professionals out there at what may seem a dumb question but i really want to understand everything i'm learning.Thanks for reading

Code:
#include<stdio.h>
int main()
{
printf("Answer=%d\n",18/9-2+6*2);
/* 18/9-2+6*2
18/9-2+12
2-2+12
2-14
my answer = -12
compiler = 12*/
printf("Answer2=%d",12-32/2*8+10);
/* 12-32/2*8+10
12-32/16+10
12-2+10
12-12
my answer = 0
compiler = -106*/
return(0);
}



