title: When is memory deallocated in c?
body: <p>I am trying to find out when memory used for variables in c is freed. As an example, when would the integer <code>i</code> be freed in the following code snippet?</p>
  
  <pre><code>int function()
  {
    int i = 1;
    // do some things
    return 0;
  }
  </code></pre>