For example:
5*3 + 9*6
As far as I know, according to types of compilers in some 5*3
is evaluated first while in other compilers 9*6
is evaluated first.
Is there a function in C or technique that can check which is evaluated first?
For example:
5*3 + 9*6
As far as I know, according to types of compilers in some 5*3
is evaluated first while in other compilers 9*6
is evaluated first.
Is there a function in C or technique that can check which is evaluated first?
Is there a function in C or technique that can check which is evaluated first?
You can define a function to multiply the numbers and add code to produce some output.
int multiply(int n1, int n2)
{
printf("Computing %d*%d\n", n1, n2);
return n1*n2;
}
and use the function to do the multiplication instead of using the multiplication operator.
multiply(5, 3) + multiply(9, 6);