title: How variable values are changed
body: <p>As I know we have to use pointers when we want to change a value of a variable outside the function, as shown here:
  <a href="https://www.tutorialspoint.com/cprogramming/c_function_call_by_value.htm" rel="nofollow noreferrer">https://www.tutorialspoint.com/cprogramming/c_function_call_by_value.htm</a>.
  But I don't understand why I am able to change the value of variable <code>name</code> inside the function.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  #pragma warning(disable:4996)
  #define MaxNameSize 14
  #define MaxNamebuffer MaxNameSize+1
  #define MaxNames 8
  
  int main()
  {
  
      void StringInsertionSort(int, int, int max, char [][MaxNamebuffer]);
      char name[MaxNames][MaxNamebuffer] = { "Taylor, Victor","Duncan, Denise","Ramdhan, Kamal","Singh, Krishna","Ali, Mechael","Sawh, Anisa","Khan, Carol","Owen, David" };
      StringInsertionSort(0, MaxNames - 1, MaxNamebuffer, name);
      printf("\nThe sorted names are:\n\n");
      for (int h = 0; h &lt; MaxNames - 1; h++)
      {
          printf("%s \n", name[h]);
      }
      return(0);
  }
  
  
  void StringInsertionSort(int lo,int hi,int max, char list[][MaxNamebuffer])
  {
      char key[MaxNamebuffer];
      for (int h = lo + 1; h &lt;= hi; h++)
      {
          strcpy(key, list[h]);
          int k = h - 1;
          while (k &gt;= lo &amp;&amp; strcmp(key, list[k]) &lt; 0)
          {
              strcpy(list[k + 1], list[k]);
              --k;
          }
          strcpy(list[k + 1], key);
      }
  
  }
  </code></pre>