include<stdio.h>int insert(char *s1, char *s2, int f){ char *cp, *tcp; tcp = s1 + strlen(s1); cp = s1 + f; if(tcp < cp) return -1; while(tcp >= cp) { *(tcp + strlen(s2)) = *tcp; tcp--; } while(*s2 != '\0') ...
代码如下:include <stdio.h>#include <string.h>void main(){ char s1[100]; char s2[20]; char k; int i,pos,len; printf("input s1: ");scanf("%s", s1 ); printf("input s2: ");scanf("%s", s2 ); getchar();//滤掉回车符 printf("input k: ...
void insert(char s1[],char s2[],int pos);void main(){ char s1[50],s2[50];int pos;gets(s1);gets(s2);printf("请选择要插入的位置: ");scanf("%d",&pos);insert(s1,s2,pos);} void insert(char s1[],char s2[],int pos){ int i,a,b;char o[20];b=0;a=strlen(s1...