title: question on c++ recursion and local variables
body: <p>suppose I have this recursion:</p>
  
  <pre><code>void doSomething(double j)
  {
      double x;
      double y;
  
      x = j -1;
      y = j -2 ;
  
      doSomething(x+y);
  
      x = j + 31;
      y = j + 12 ;
  }
  </code></pre>
  
  <p>I know that this recursion executes infinitely, but just ignore that</p>
  
  <p>My question is with regards to variables x and y's scope in the recursion tree...will x and y's scope be valid only for the function in that specific stage in the recursion tree? or when I call doSomething() again, when the child doSomething() in the recursion tree redeclares x and y, will it reset the parents' x and y variables as well or is it creating an entirely new x and y variables that is valid for that stage in the recursion tree only? </p>