title: pointer string is not taking input in C programming
body: <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
     int w,p;
     char *name[1000];
     for(w=0; p!=2; w++)
     {
        printf("Add a name: ");
        gets(name[w]);
        printf("Want to add another one?\n1 for yes\n2 for no\n");
        scanf("%d",&amp;p);
     }
  }
  </code></pre>
  
  <p>This code is not working. If I write:
       char *name[3]={"Mitchell Johnson", "Mitchell Starc", "Steven Smith"};
  then it works. but i want to take strings as input. dont want to define it.
   But console box stops working after taking 1 string input. How to do it right? Please help. Thanks.</p>