其他分享
首页 > 其他分享> > hello,world今天没去自习,学了一个超级简单的复制函数,不行我得再打一个

hello,world今天没去自习,学了一个超级简单的复制函数,不行我得再打一个

作者:互联网

include<stdio.h>

include<string.h>

main()
{
char str1[30],str2[30];
printf("输出目的字符串:\n");
gets(str1);
printf("输出源字符串:\n");
gets(str2);

printf("输出目的字符串:\n");
puts(str1) ;
printf("输出目的字符串:\n");
puts(str2);
strcpy(str1,str2);
printf("调用strcpy函数进行字符串复制:\n");
printf("复制字符串之后的目的字符串:\n");
puts(str1);

}

标签:输出,puts,str2,str1,printf,字符串,world,自习,hello
来源: https://www.cnblogs.com/redxi/p/10872898.html