title: How to use strcpy() with array elements?
body: <p>I have an array called <code>array</code>, and I want to copy a word that I have read in from some file and store it into that array at a certain index, how can I don it?</p>
  
  <p>I thought when a file is read all input from the file is in "string" form. So if a number 100 is in the file its represented as "100".</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>#define maxlength 10
  
  char array[10];
  int i = 0;
  char word[maxlength];
  
  strcpy(array[i], word); //error
  array[i] = word; //error
  </code></pre>
  
  <p>My guess is because the <code>word</code> is an array of characters it's not actually a string to copy through. Is there a way I can copy the <code>word[]</code> into the <code>array[]</code> in a string format? I.E. index 0 in array = ["hello"] index 1 = ["world"] etc.</p>