title: Does scanf() update constant variables?
body: <p>It seems that <code>scanf()</code> updates constant variables.</p>
  <p>As far as I know, constant variables are supposed to have fixed values.</p>
  <p>In the following code...</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main () {
      const int testInteger = 0;
  
      printf(&quot;Before 'scanf', the value of the variable 'testInteger' is %d.\n&quot;, testInteger);
  
      // Does 'scanf' update constant variables?
      printf(&quot;Enter an integer: &quot;);
      scanf(&quot;%d&quot;, &amp;testInteger);
  
      printf(&quot;After 'scanf', the value of the variable 'testInteger' is %d.\n&quot;, testInteger);
  
      return 0;
  }
  </code></pre>
  <p>...by entering the value of '50', it gives the following output:</p>
  <pre><code>Before 'scanf', the value of the variable 'testInteger' is 0.
  Enter an integer: 50
  After 'scanf', the value of the variable 'testInteger' is 50.
  </code></pre>
  <p>I would like to know why does <code>scanf()</code> update the value of the 'testInteger' constant variable.</p>