I wanted to ask a question regarding the "C Operation Order". Can someone explain the order of the following?:
1) a = 1;
x = a * a ;
2) a = 1;
c = (a || (a )) * a;
Thank you very much!
CodePudding user response:
x = a * a ;
is Undefined Behaviour.a = 1; c = (a || (a )) * a;
it's as if thea
does not exist becausea
is true.
CodePudding user response:
The first one is 1 because you add 1 after multiplying. And the second one doesnt make sense because || is a comperator.