fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. char p[] = "ist5-1.filesor.com//pimpandhost.com//1//_//_//_//1//6//E//C//S//6ECSn//Kevin.jpg";
  5. char pm[] = "ist5-1.filesor.com//pimpandhost.com//1//_//_//_//1//6//E//C//S//6ECSn//Kevin.jpg";
  6. int ndx = 36;
  7. size_t sz = strlen(p+ndx+1);
  8. strncpy(p+ndx,p+ndx+1, sz);
  9. p[ndx+sz] = '\0';
  10. memmove(pm+ndx,pm+ndx+1, sz);
  11. pm[ndx+sz] = '\0';
  12. printf("strncpy:%s\nmemmove:%s",p,pm);
  13. }
Success #stdin #stdout 0s 4172KB
stdin
Standard input is empty
stdout
strncpy:ist5-1.filesor.com//pimpandhost.com/1//_//_//_/1//66//E//C//S//6ECSn//Kevin.jpg
memmove:ist5-1.filesor.com//pimpandhost.com/1//_//_//_//1//6//E//C//S//6ECSn//Kevin.jpg