#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char firstname[20];
char name[40];
cout << "Enter your first name:";
cin.getline(firstname,20);
cout << "Enter your last name:";
cin.getline(name,40);
strcat(name,", ");
strcat(name,firstname);
cout << "Here's the information in a single string: " << name << endl;
return 0;
}Exercise 4.3
最新推荐文章于 2022-03-15 10:07:14 发布

315

被折叠的 条评论
为什么被折叠?



