title: Two Dimensional Array of Characters in C
body: <p>Help me to get out of this problem. I'm using GCC on ubuntu12.04. While I write this program to get 5 strings from keyboard n then print these strings on screen. Program is compiled but during execution it takes strings from keyboard but print only last string. The program which I have written is below:</p>
  
  <pre><code>void main()    
  {  
      char names[10];  
      int i,j;
  
      for(i=0;i&lt;5;i++)  
      {  
          printf(" Enter a name which you want to register\n");  
          scanf("%s",names);  
      }  
      for(i=0;i&lt;5;i++)    
          printf(" the names you enter are %s\n", names);  
  
  }
  </code></pre>