title: Lack of return statement in recursive function, still works
body: <p>I'm enrolled in a CS class and we are learning about recursion. The teacher showed us some code and I'm wondering why it works.
  buscar is a recursive search function in an array v[]. It returns the position of x in v[]</p>
  
  <pre><code>int buscar(int x, int v[], int n) {
      if(n == 0) return -1;
      if(x == v[n-1]) return n-1;
      buscar(x, v, n-1);
  }
  
  int main() {
      int v[] = {5, 3, 9, 12};
      printf("%d\n", buscar(5, v, 4));
  }
  
  </code></pre>
  
  <p>The problem here is </p>
  
  <pre><code>buscar(x, v, n-1);
  </code></pre>
  
  <p>Shouldn't it return 'nothing' and terminate with some error?
  When I run this program, the result is correct as expected. Why does it work the same as </p>
  
  <pre><code>return buscar(x, v, n-1);
  </code></pre>