title: Populating 2D array with if statement in C
body: <p>new programmer needs advice. I've created a 5 by 5 board using 2d arrays. However I want to fill the array table with 4 possible letters x, y, z. </p>
  
  <pre><code>createBoard()
  {
      char myArray[5][5];
      int i,j;
      for(i=0; i &lt; ROW; i++){
          for(j=0; j &lt; COL; j++){
              if(myArray[0][1]){
              myArray[i][j] = '0';
              printf("%c ", myArray[i][j]);
          }
      }
          printf("\n");
      }
  
      printf("%d\n", myArray[i][i]);
      getchar;
      return 0;
  }
  
  int main(int argc, char *argv[]){
      createBoard();
  }
  </code></pre>
  
  <p>As of right now, all this does is fill the 5 by 5 with 0's. I want it to have a mix of x,y and z's. Would I be better of just filling each array myself like</p>
  
  <pre><code>char myArray[5][5] = 
  {
  {z,y,z,x,y},
  {y,y,x,x,z},
  }
  </code></pre>
  
  <p>and so on? or is there a better way considering later on I need to create functions to take in user input and manipulate the positions of the x, y, and z characters.</p>
  
  <p>Cheers for any guidance</p>