title: why the output is last string from user?
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  int main()
  {
      int in,i,j;
      char *arr[100],str[14];
      scanf("%d",&amp;in);
      i=0;
      while(i&lt;in)
      {
          scanf("%s",str);
          arr[i]=str;
        //  printf("%s\n",arr[i]);
          i++;
      }
      i=0;
      while(i&lt;in)
      {
        printf("%s\n",arr[i++]);
  
      }
    return 0;
  
  }
  </code></pre>
  
  <p>/* in this code i had take input strings from user and wants to print it back but it is printing the last string input by the user .WHY?? */</p>