7-6 字符串复制 (11 分)

7-6 字符串复制 (11 分)
编写自定义函数把一个字符串(不超80字符)的内容复制到另一个字符数组中。主函数输入一串字符,复制到另一个数组中输出。

#include<stdio.h>
int str_copy(char *d,char *s){
//请在此输入你的代码
}
int main(){
char pa[81];
char pb[81];
gets(pa);
str_copy(pb,pa);
printf("%s",pb);
return 0;
}
输入样例:
#include<stdio.h>
结尾无空行
输出样例:
#include<stdio.h>
结尾无空行


#include<stdio.h>
#include<string.h>
int str_copy(char* d, char* s) {
    //请在此输入你的代码
    strcpy(d,s);
    return 0;
}
int main() {
    char pa[81];
    char pb[81];
    gets_s(pa);
    str_copy(pb, pa);
    printf("%s", pb);
    return 0;
}