/* strcpy example */
#include <stdio.h>
#include <string.h>
int main ()
{
char str1[]="Sample string";
char str2[40];
char str3[40];
strcpy (str2,str1);
strcpy (str3,"copy successful");
printf ("str1: %s\nstr2: %s\nstr3: %s\n",str1,str2,str3);
return 0;
}
|
| memcpy | 拷贝内存块(function) |
| strncpy | 从字符串复制字符(function) |
| memchr | 在内存块中定位字符(function) |
| memcmp | 比较两个内存块(function) |
| memset | 填充内存块(function) |
| memmove | 移动内存块(function) |