33,311
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
using namespace std;
int main(void)
{
char *p="qqweqweq";
char *q="asd";
while(*q)
{
*p++=*q++;
}
*p='\0';
cout<<q<<endl;
}
#include<iostream>
using namespace std;
int main(void)
{
char a[]="qqweqweq";
char b[]="asd";
char *q=b;
char *p=a;
while(*q)
{
*p++=*q++;
}
*p='\0';
p=p-strlen(b);
cout<<p<<endl;
}
#include<iostream>
using namespace std;
int main(void)
{
char p[]="qqweqweq";
char q[]="asd";
while(*q)
{
*p++=*q++;
}
*p='\0';
cout<<q<<endl;
}