title: function not returning anything but its data member (char array) can be accessed in main function. How is this possible?
body: <pre><code>#include &lt;stdio.h&gt;
  
  void foo(char a[],char b[])
  {
      a[0]='t';
      a[1]='e';
      a[2]='s';
      a[3]='t';
      a[4]='_';
      a[5]='a';
      a[6]=NULL;
  
      b[0]='t';
      b[1]='e';
      b[2]='s';
      b[3]='t';
      b[4]='_';
      b[5]='b';
      b[6]=NULL;
  
  }
  
  int main()
  {
      char a[10],b[10];
      foo(a,b);
      printf("%s \n",a);    //outputs "test_a"
      printf("%s \n",b);    //outputs "test_b"
  }
  </code></pre>
  
  <p>How does <code>a[]</code> and <code>b[]</code> char arrays in <code>main()</code> get its value, when <code>foo()</code> is neither using pointers nor returning any value when it is called through <code>main()</code>? </p>
  
  <p>Correct me if I am wrong in saying "<code>foo()</code> is not using pointers".</p>