Description
读入两个字符串s1和s2,将s2中的全部字符复制到字符数组s1中去。要求不使用strcpy函数,并保证字符串末尾的’’标识符同时被赋值。
Input
两行字符串s1和s2。保证每个字符串的长度不超过100。
Output
将s2赋值至s1后的s1对应的字符串。
请注意行尾输出换行。
Sample Input
I am a program. I am not a program.
Sample Output
I am not a program.
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a[100],b[100];
gets(a);
gets(b);
strcpy(a,b);
puts(a);
}