title: When do I need dynamic memory?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11241014/malloc-or-normal-array-definition">Malloc or normal array definition?</a>  </p>
  </blockquote>
  
  
  
  <p>We learn that there is dynamic memory in C and dynamic variables:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int a = 17;
  int main(void)
  {
    int b = 18; //automatic stack memory
    int * c;
    c = malloc( sizeof( int ) ); //dynamic heap memory
    *c = 19;
    printf("a = %d at address %x\n", a, &amp;a);
    printf("b = %d at address %x\n", b, &amp;b);
    printf("c = %d at address %x\n", *c, c);
    free(c);  
    system("PAUSE");  
    return 0;
  }
  </code></pre>
  
  <p>How do I know which type of memory to use? When do I ned one or the other?</p>