title: How to find index of max array element recursively
body: <p>I want to find the index of biggest element of an array recursively. The declaration of the function can be like this:</p>
  
  <pre><code>int maxIndex(const int *p, int size)
  </code></pre>
  
  <p>I was studying recursion and I saw some examples, like finding the max array element recursively. That is simple like this:</p>
  
  <pre><code>int maxInt( const int * p, int size)   
  {
  
      if(size == 1)
          return *p;
  
      int max = maxInt(p + 1, size -1 );
  
      if(max &gt; *p)
          return max;
      else
          return p[0];
  }
  </code></pre>
  
  <p>And I asked myself that how can I find the index which includes max element of the array.
  I am not even sure it is possible. What do you think?</p>