title: Recursive function for finding power returns zero for large exponents
body: <p>The function bellow works fine for small positive exponents and base. If the exponent is large then memory wouldn't be enough and the program should be terminated. Instead, if that function is called for large exponents, zero is returned.Why? One guess is that a multiplication with zero occurred but there is no such case.</p>
  
  <p>One example where zero is returned is <code>power(2,64)</code> .</p>
  
  <pre><code>unsigned long long int power(unsigned long long int base,int exp){
  
      if (exp == 0 &amp;&amp; base != 0)
          return 1;
  
      return base*power(base,exp-1);
  }
  </code></pre>