title: C Programming compare rows and columns of 2d array
body: <p>Hey guys so I am trying to compare the rows and columns of a 2d array to see if there are any pairs of letters directly near each other. I can make the array no problem, but my only problem is I have no idea how to go about comparing the rows separately, and then the columns..If you could help me out at all that would be amazing! thank you! </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;time.h&gt;
  
  int main( void )
  {  
  
  int x = 0;
  int y = 0;
  int countX = 0;
  int countY = 0;
  srandom( (unsigned) time(NULL) );
  char array[x][y]; 
  
  
  for (x=0;x&lt;20;x++)
      {
       for (y=0; y&lt;30; y++)
        {
         array[x][y] = random() % 26 + 65;
         printf("%c ",array[x][y]);
        }
  printf("\n");
      }
  printf ("\n\n");
  
  return ( 0 ) ;
  
  } 
  </code></pre>