title: understanding this function c++
body: <p>i have this c++ function below
  the function uses the first and last index and checks if the the following number is greater or less than the next index. if it is, then the x or y variable is replaced with the value of the current index.</p>
  
  <p>this is the function:</p>
  
  <pre><code>template&lt;class Type&gt;
  void funcExp(Type list[], int size) {
      Type x = list[0];
      cout &lt;&lt; x &lt;&lt; endl;
      Type y = list[size - 1];
      cout &lt;&lt; y &lt;&lt; endl;
      for(int j = 1; j &lt; size; j++) {
          if(x &lt; list[j]) x = list[j];
  
          if(y &gt; list[size - 1 - j]) y = list[size - 1 - j];
      }
      cout &lt;&lt; x &lt;&lt; endl;
      cout &lt;&lt; y &lt;&lt; endl;
  }
  </code></pre>
  
  <p>in my main i have this:</p>
  
  <pre><code>int list[10] = {5,3,2,10,4,19,45,13,61,11};
  funcExp(List, 10);
  </code></pre>
  
  <p>i understand how the code works for numbers however i am unsure how this code works with strings. 
  for example:</p>
  
  <pre><code>string strList[] = {"One", "Hello", "Four", "Three", "How", "Six"}; 
  funcExp(strList, 6);
  </code></pre>
  
  <p>returns the following output:</p>
  
  <pre><code>x = three 
  y = four
  </code></pre>
  
  <p>i thought that it was counting each character but i got a different output.
  my question is, how does this function work an array of strings.</p>