设计函数char *insert(s1,s2,n),用指针实现在字符串s1中的指定位置n处插入字符串s2

日期:2008-06-24 12:26:04 人气:2

设计函数char *insert(s1,s2,n),用指针实现在字符串s1中的指定位置n处插入字符串s2

#include #include int length(char *s); char *insert(char *s1, char *s2, int n); void main() { char *s1 = "I am going!", *s2 = "not "; s1 = insert(s1, s2, 5); printf("%s\n", s1); free(s1); // 插入字符串
    A+
热门评论