#include <strings.h>
void bcopy(const void *src, void *dest, size_t n);
#include <stdio.h>
#include <string.h>
int main()
{
char dest[128] = "aaaaaa";
char src[64] = "hello linux";
bcopy(src, dest, 5);
dest[5] = '\0';
printf ("%s\n", dest);
return 0;
}
./bcopy
hello
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |