title: Passing char array by reference
body: <p>I am passing a char array by reference but when I return from function and print the array, it  displays nothing. What am I doing wrong?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  void func(char []);
  int main()
  {
     char a[100];
     func(a);
  
     cout &lt;&lt; a&lt;&lt;endl;
     return 0;
  }
  
  void func(char *array)
  {
     array="Inserting data in array a";
     cout &lt;&lt; array&lt;&lt;endl;
  }
  </code></pre>
  
  <p>Regards</p>