/*
memcpy == memmove 와 기능은 동일하나 겹치는 경우를 생각하지 않는다.
movedata == memmove 기능은 동일하나 번지지정을 seg:off형식으로 한다.
movmem == memmove 기능은 동일하나 단 유닉스에서 쓸 수 없다.
*/
#include <stdio.h>
#include <string.h>
char s1[20] = "1234567890";
char s2[20] = "1234567890";
void main( void )
{
puts( s1 );
memcpy( s1+4, s1+2, 5 );
puts( s1 );
puts( s2 );
memmove( s2+4, s2+2, 5 );
puts( s2 );
}
memcpy == memmove 와 기능은 동일하나 겹치는 경우를 생각하지 않는다.
movedata == memmove 기능은 동일하나 번지지정을 seg:off형식으로 한다.
movmem == memmove 기능은 동일하나 단 유닉스에서 쓸 수 없다.
*/
#include <stdio.h>
#include <string.h>
char s1[20] = "1234567890";
char s2[20] = "1234567890";
void main( void )
{
puts( s1 );
memcpy( s1+4, s1+2, 5 );
puts( s1 );
puts( s2 );
memmove( s2+4, s2+2, 5 );
puts( s2 );
}