CodePudding user response:
Reference:# include & lt; Stdio. H>
Char * str_lnk (char * p, char * q);
Int main (int arg c, char * argv [])
{
Char *=new cha char [20], * CHB=new char [10].
Gets (cha);
Gets (CHB);
Puts (str_lnk (cha, CHB));
system("pause");
return 0;
}
Char * str_lnk (char * p, char * q)
{
Char * t;
T=q;
While (* t) t++;
If (t - q<10) {
T=p;
While (* t) t++;
Q) while (* * * q++ t++=;
* t='\ 0';
return p;
}
The else
return q;
}