title: How is value of macro getting change
body: <pre><code>#include &lt;stdio.h&gt;
  int main()
  {
      int var;
      printf(&quot;write the value of var:\n&quot;);
      scanf(&quot;%d&quot;, &amp;var);
  #define NUM var
  
      printf(&quot;The value of S is %d\n&quot;, NUM);
      var = var + 1; //changing the value of variable 'var'
      printf(&quot;New value of S is %d&quot;, NUM);
  return 0;
  }
  </code></pre>
  <p>Following is the result...</p>
  <pre><code>write the value of var:
  10
  The value of S is 10
  New value of S is 11
  [Program finished]
  </code></pre>
  <p>In this program, I want to make constant the value of variable 'var' once it's entered by user. so, I have defined a macro with macro templet 'NUM' and macro expansion 'var'.
  But when I change the value of 'var' on execution time then the value of 'NUM' also get changed. Don't know how?
  Actually I don't know that can we use any variable in macro expansion ?</p>