title: How does the preprocessor work in C?
body: <p>Why is the answer for the below code 16? Can anybody explain the working of this program?</p>
  
  <pre><code>#define SQUARE(n) n*n
  void main()
  {
      int j;      
      j =16/SQUARE(2);
  
      printf("\n j=%d",j);
      getch();
  }
  </code></pre>
  
  <p>If we write the same code like below, then the answer is 4:</p>
  
  <pre><code>//the ans is 4 why?
  #include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  
  #define SQUARE(n) n*n
  
  void main()
  {
      int j;      
      j =16/(SQUARE(2));
  
      printf("\n j=%d",j);
      getch();
  }
  </code></pre>