title: How to store a changed variable as the original variable
body: <p>Say, you wanted to know how many times a program has been executed. Is it possible to have a variable, then when the program has been accessed increment the variable by 1 etc. and then store it back as that original variable so that the next time it is executed, it can be incremented again.</p>
  
  <p>E.g. (This is not correct or real code)</p>
  
  <pre><code>/*variable to be stored*/
  int num;
  
  /*initial value*/
  num = 0;
  .
  /*some stuff I'll do*/
  
  
  /*so that num becomes incremented*/
  /*please don't rage that I have done it this way*/
  num = num + 1;
  </code></pre>
  
  <p>...and then somehow store it back into <code>int num</code>.</p>
  
  <p>Please help me, suggestions welcome.</p>