title: C Macro Question -(x) vs (-x)
body: <p>I'm going through quiz answers from my professor and a question was: </p>
  
  <p>the correct implementation of a function like macro for absolute value is:</p>
  
  <pre><code>#define abs(x) ((x)&lt;0 ? (-x) : (x))
  #define abs(x) ((x)&lt;0 ? -(x) : (x))
  </code></pre>
  
  <p>Why is the second one correct vs the first one?</p>
  
  <p>And why do you have to use all the ().  Like what are the rules involved?  Every variable needs a ()?  Thanks.</p>