title: strcpy () not working properly
body: <p>I am currently writing a program where i was stuck in a different kind of behaviour of strcpy() function . Here is short demo of it...</p>
  
  <p>I went through the following question : <a href="https://stackoverflow.com/questions/1726298/strip-first-and-last-character-from-c-string">Strip first and last character from C string</a></p>
  
  <pre><code>//This program checks whether strcpy() is needed or not after doing the modification in the string 
  #include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main()
  {
          char mystr[] = "Nmy stringP";
          char *p = mystr ;
          p++;
  
          p[strlen(p)-1] = '\0';
          strcpy(mystr,p);
          printf("p : %s mystr: %s\n",p,mystr);
  
  }
  </code></pre>
  
  <p>Output :-</p>
  
  <pre><code>p : y strnng mystr: my strnng
  </code></pre>
  
  <p>If i dont use strcpy() function , then i get </p>
  
  <pre><code>p : my string mystr : Nmy string 
  </code></pre>
  
  <p>Why is this happening ??</p>