title: Add an row and a column around an multilinear array
body: <p>I want to add a row and a column of 1 around an multidimensional array in C.</p>
  <p>For the input 1,2,3,4,5,6,7,8,9 - this is how I want it to be added. Is there in C a function like append in python, or how this can be done?</p>
  <p><a href="https://i.stack.imgur.com/yilum.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yilum.png" alt="enter image description here" /></a></p>
  <p>The code I already have for asking the user for elements and printing:</p>
  <pre><code>#include &lt;stdio.h&gt;
  int main()
  {
      int n,m;
      printf(&quot;Lines: &quot;);
      scanf(&quot;%d&quot; , &amp;n);
      printf(&quot;Columns: &quot;);
      scanf(&quot;%d&quot;, &amp;m);
      int arr[n][m];
  
  //    Input Elements
      printf(&quot;Input array elements: \n&quot;);
      for (int i=0 ; i&lt;n ; i++)
      {
          for(int j=0 ; j&lt;m ; j++)
          {
              printf(&quot;arr[%d][%d]=&quot;,i,j);
              scanf(&quot;%d&quot; , &amp;arr[i][j]);
          }
      }
  //    Show Elements
      for (int i=0 ; i&lt;n+1 ; i ++) {
          for(int j=0; j&lt;m+1; j ++) {
              printf(&quot;%d\t&quot;, arr[i][j]);
          }
          printf (&quot;\n&quot;);
      }
  
      return 0;
  }
  </code></pre>
  <p>Thanks</p>