title: How to change a variable's value in the executable file written by C?
body: <p>For example,I wrote a simple C program:</p>
  
  <pre class="lang-c prettyprint-override"><code>#include&lt;stdio.h&gt;
  int a;
  int main(){
      printf("a:%d\n", a);
      return 0;
  }
  </code></pre>
  
  <p>Then I use gcc to compile it and it output a executable file <code>a.exe</code>.<br>
  Now I want to write another program to read <code>a.exe</code> and change the value of the variable <code>a</code>.<br>
  How can I do it ?</p>
  
  <hr>
  
  <p>I just want to save some data rather than hack.<br>
  Is there any libraries to help me do this?</p>