Language/C

memmove()

퓨림노 2008. 10. 7. 19:13


#include <string.h>
#include <stdio.h>

int main()
{
  //char *src="last chrisrmas gave you my heart";
 char src[]="test CardIndex 50 50";
  char *dest=src+14;
  printf("before memmove : %s\n", src);
  memmove(dest, src, 4);
  printf("after memmove : %s\n", src);
  return 0;
}