title: Changing value of a variable in C
body: <blockquote>
    <p>Why should one change the <strong>value of the main variable</strong> and <strong>NOT</strong> the COPY of the variable. </p>
  </blockquote>
  
  <p>I have a method</p>
  
  <pre><code>int plusInt(int x){
   return ++x; 
  }
  </code></pre>
  
  <p>When this function is called, a new stack frame is created, with the <strong>copy of x</strong> and <strong>not the original</strong> variable. So this changes this copy's value?</p>
  
  <p><strong>Q:</strong> If I want to change the value of the original variable I use a pointer to it and then increase a value right? Eg:</p>
  
  <pre><code>int plusIntPointer(int *x){
   return ++*x; 
  }
  </code></pre>
  
  <p>But what is the use/why would someone want to change the value of the original variable and not the copy?</p>