title: (C Programming) How do I insert string into a character array and then print out all the elements of this array?
body: <p>I have this string that is presented in the form of character array <code>temp</code>. And I want to insert this character array to another array <code>temp_list</code> and then print out the contents of this array. In other words, storing many character arrays in a single array. Can anyone tell me if this is possible and how can I make it work?</p>
  <p>This is an example of what I am trying to accomplish:</p>
  <pre><code>int main()
  {
      char temp[5] = &quot;begin&quot;;
      char temp_list [10];
      temp_list[0] = temp;
  
      for (int i = 0; i &lt; strlen(temp_list); i++)
      {
          printf(&quot;Labels: %s,&quot;, temp_list[i]);
      }
  }
  </code></pre>
  <p>When I run this program, it prints out gibberish.</p>
  <p>Any form of guidance would be very appreciated. Thank you.</p>
  <p>Edit:</p>
  <p>Thank you for the answers. They are all really helpful. But I have another question... what if I have multiple character arrays that I want to insert to <code>temp_list</code>? Using <code>strcpy</code> multiple times seem to not work, since I am assuming the function basically replaces the entire content of the <code>temp_list</code> with the string passed with <code>strcpy</code>?</p>