title: Struct array string merge with another string in c
body: <p>So i have a problem where the string in struct merge with another array. See the code and output for more explanation.
  Code:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  struct print
  {
      char code[3];
      char name[10];
  }test[2]={&quot;001&quot;,&quot;Alen&quot;,&quot;101&quot;,&quot;Paul&quot;};
  
  int main()
  {
  
      int x;
      for(x=0;x&lt;2;x++)
      {
          printf(&quot;%s %s\n&quot;,test[x].code,test[x].name);
      }
      return 0;
  }
  </code></pre>
  <p>Output:</p>
  <pre><code>001Alen Alen
  101Paul Paul
  
  Process returned 0 (0x0)   execution time : 0.017 s
  Press any key to continue.
  </code></pre>
  <p>The output is wrong, it should be like this:</p>
  <pre><code>001 Alen
  101 Paul
  </code></pre>
  <p>So why the &quot;name&quot; merge in &quot;code&quot; variables? It shouldn't be like that. So how do i solve this? Thank you.</p>