title: Copy elements of one array to another in C
body: <p>So I am trying to use char array in C to copy from one array to another, each element at a time, however, I am stuck at this part. I did try to research but may be I'm a dumb or what not, I still could not get it right. Here is my code:</p>
  
  <p>Say I have two array</p>
  
  <pre><code>char arr1[1000][3]
  char arr2[1000][3]
  </code></pre>
  
  <p>So wHat I mean is that [3] equal length of the string and each array has 1000 elements. So <code>arr1[0] = "AB\0"</code></p>
  
  <p>I can't, obviously, do <code>arr1[i] = arr2[i];</code> won't work of course, I did try strcpy but don't quite get it right. Please help me out a bit, thank you :)</p>
  
  <p>Here a portion of it, the specific function I writing:
  Please just answer the one I ask, I can do this easily in Java but I really learning C so...
  An example would be nice :D</p>
  
  <pre><code>//build stacks                                                                                                                                                                                                     
  card_pos_ptr add_card(card_pos_ptr head, char card_list[1000][3], int index){
    int i,k = 0;
    int start_index = index;
    card_pos_ptr current = head;
    for(i=0;i&lt;13;i++){
      for(k=0;k&lt;4;k++){
        if(current-&gt;card_stack == NULL){
          card_ptr node = (card_ptr)malloc(sizeof(card));
      strcpy(node-&gt;card_name,);
          node-&gt;up = false;
          node-&gt;down = NULL;
          start_index++;
        }else{
          card_ptr node = (card_ptr)malloc(sizeof(card));
          //node-&gt;card_name[0] = card_list[start_index];                                                                                                                                                             
          node-&gt;up = false;
          node-&gt;down = current-&gt;card_stack;
          current-&gt;card_stack = node;
          start_index++;
        }
      }
      current = current-&gt;next_pos;
    }
  
  }
  </code></pre>