title: correct way to return two dimensional array from a function c
body: <p>I have tried this but it won't work:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
      int * retArr()
      {
      int a[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
      return a;
      }
  
      int main()
      {
      int a[3][3] = retArr();
      return 0;
      }
  </code></pre>
  
  <p>I get these errors:</p>
  
  <blockquote>
    <p>Error 3   error C2075: 'a' : array initialization needs curly braces<br>
      4   IntelliSense: return value type does not match the function type</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>