标签:c语言、字符串拷贝
#include <stdio.h>
void main()
{
char a[] = "123";
char b[10];
char *s, *p;
s = a;
p = b;
//取s的值,s自加,取p的值,p自加,将old_s的值赋给old_p
while(*p++ = *s++);
s = NULL;
p = NULL;
printf("%s\n", b);
}
字符串拷贝的简单C语言实现
原文地址:http://artinfo.blog.51cto.com/10067034/1629365