int a,b,c;
a=b+c;
Test2:
int a,b,c;
b+=c;
a=b;
(Where it is a empty space there should be a <plus>)
int a,b,c;
a=b+c;
Test2:
int a,b,c;
b+=c;
a=b;
(Where it is a empty space there should be a <plus>)
Quote:Original post by darkforest
Is it Test1 or Test2, please explain why...
Test1:int a,b,c;a=b+c;
Test2:int a,b,c;b+=c;a=b;
(Where it is a empty space there should be a <plus>)
mov eax, ; eax = badd eax, [c] ; eax += cmov [a], eax ; a = eax
Since it doesn't have much other options (on the x86, that is).mov a, badd a, c
add b, cmov b, a
Quote:Original post by darkforestSpeed is absolutely irrelevant. The two have different behaviours. The second one modifies the value of b whereas the first one does not. Without furthur code to place this in context, the question is meaningless.
Is it Test1 or Test2, please explain why...
Test1:int a,b,c;a=b+c;
Test2:int a,b,c;b+=c;a=b;
(Where it is a empty space there should be a <plus>)