title: Filling two dimensional array C
body: <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      //Variables
      int x=0,y=0;
      int my_data[7][7];
      for (x=0;x&lt;9;x++) {
          printf("Enter rows:");
          scanf("%i",&amp;x);
         // printf("%i\n",my_data[x][y]);
      }
      for(y=0;y&lt;9;y++) {
          printf("Enter columns: ");
          scanf("%i", &amp;y);
          //printf("%i\n",my_data[x][y]);
      }
      for(y=0;y&lt;9;y++) {
      printf("%i\n",my_data[0][y]);
      }
      return 0; //Return process complete.
  }
  </code></pre>
  
  <ol>
  <li>declares an 8X8  integer array my_data </li>
  <li>prompts the user for data to fill the 8X8 array my_data </li>
  <li>prints the sum of all the elements for each row </li>
  <li>prints the sum of all the elements in the 8X8 array </li>
  <li>prints the sum of all the elements in the diagonal of the 8x8 array.</li>
  </ol>
  
  <p>What did I do wrong? When I enter 1,2,3,4,5,6,7,8; 1,2,3,4,5,6,7,8
  I get back: </p>
  
  <pre><code>3612392
  2686632
  1966142592
  3604480
  0
  1966142601
  1825884643
  4
  3612396
  </code></pre>