title: How many copies of the variable C are created by this snippet of code?
body: <p>For some homework, I need to figure out how many copies of the variable "c" are created by this program, as well as their values. An explanation would be nice as well, as I am trying to recover from having a not so great computer science professor in my first year. </p>
  
  <p>Here is the code snippet:</p>
  
  <pre><code>  int child = fork();
    int c = 5;
    if (child == 0) 
    {
       c += 5;
    } 
    else
    {
       child = fork();
       c += 10;
       if (child) 
       {
           c += 10;
       }
    }
  </code></pre>