title: Calculating with a float in macros in C
body: <p>My colleague and I are studying for a test, where we have to analyze C Code. Looking through the tests from the previous years, we saw the following code, which we don't really understand:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #define SUM(a,b) a + b
  #define HALF(a)  a / 2
  
  int main(int argc, char *argv[])
  {
    int big = 6;
    float small = 3.0;
  
    printf("The average is %d\n", HALF(SUM(big, small)));
    return 0;
  }
  </code></pre>
  
  <p>This code prints 0, which we don't understand at all... Can you explain this to us?</p>
  
  <p>Thanks so much in advance!</p>