static void Splicing(const char* one ,const char* two , char* result ){
register int i ;
for( i = 0 , j = 0 ; ; ++i ){// 将子一个字符串放进接收结果字符串里面
if( ono[ i ] == ' ' ){
result[ i ] = ' ' ;
break;
} else{
result[ i ] = one[ i ] ;
}
}
for( register int j = 0 ; ; ++j , ++i ){/// 将第二个字符串放进接收结果的字符串里面,索引起始值 在第一个字符串 (边界)索引位置 开始
if( two[ j ] == ' ' ){
result[ j ] = ' ' ;
break ;
} else{
result[ i ] = two[ j ] ;
}
}
}
int main(){
const char one[100] = "123456";
const char two[100] = "789";
char result[100];
Splicing( one ,two , result ) ;
printf("输出拼接后的字符串:%s " , result ) ;
}