• 大小: 540KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-08
  • 语言: C/C++
  • 标签: C语言  

资源简介

C语言程序开发范例宝典,这本书所配套的部分源代码,300个

资源截图

代码片段和文件信息

#include
char *replace(char *s1char *s2int pos)/*自定义替代函数*/
{
    int ij;
    i=0;
    for(j=pos;s1[j]!=‘\0‘;j++)/*从原字符串指定位置开始替代*/
     if(s2[i]!=‘\0‘)
     {
     s1[j]=s2[i];/*将替代内容逐个放到原字符串中*/
     i++;
     }
     else
     break;
    return s1;/*将替代后的字符按串输出*/
}
void main()
{
    char string1[100]string2[100];/*定义两个字符串数组*/
    int position;
    printf(“\nPlease input original string:“);
    gets(string1);/*输入字符串1*/
    printf(“\nPlease input substitute string:“);
    gets(string2);/*输入字符串2*/
    printf(“\nPlease input substitute position:“);
    scanf(“%d“&position);/*输入要替换的位置*/
    replace(string1string2position);/*调用替换函数*/
    printf(“\nThe final string:%s\n“string1);/*输出最终字符串*/
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     185773  2018-12-16 18:52  cyuyanbddaima\1.rar

     文件        331  2009-09-01 11:20  cyuyanbddaima\2\mingriosft\1\001.C

     文件        819  2009-09-01 11:23  cyuyanbddaima\2\mingriosft\1\002.C

     文件       1130  2009-09-01 11:29  cyuyanbddaima\2\mingriosft\1\003.C

     文件       1274  2009-09-01 11:29  cyuyanbddaima\2\mingriosft\1\004.C

     文件        772  2009-09-01 11:30  cyuyanbddaima\2\mingriosft\1\005.C

     文件        494  2009-09-01 11:30  cyuyanbddaima\2\mingriosft\1\006.C

     文件        335  2009-09-01 11:31  cyuyanbddaima\2\mingriosft\1\007.C

     文件        433  2009-09-01 11:31  cyuyanbddaima\2\mingriosft\1\008.C

     文件        362  2009-09-01 11:32  cyuyanbddaima\2\mingriosft\1\009.C

     文件        779  2009-09-01 11:32  cyuyanbddaima\2\mingriosft\1\010.C

     文件       1185  2009-09-01 11:33  cyuyanbddaima\2\mingriosft\1\011.C

     文件       3802  2009-10-14 00:55  cyuyanbddaima\2\mingriosft\1\012.C

     文件        341  2009-09-01 11:34  cyuyanbddaima\2\mingriosft\1\013.C

     文件        510  2009-09-01 11:35  cyuyanbddaima\2\mingriosft\1\014.C

     文件        469  2009-10-14 00:55  cyuyanbddaima\2\mingriosft\1\015.C

     文件        389  2009-09-01 11:37  cyuyanbddaima\2\mingriosft\1\016.C

     文件        782  2009-10-14 00:55  cyuyanbddaima\2\mingriosft\1\017.C

     文件        427  2009-09-01 11:37  cyuyanbddaima\2\mingriosft\1\018.C

     文件        397  2009-09-01 11:38  cyuyanbddaima\2\mingriosft\1\019.C

     文件        571  2009-10-14 00:55  cyuyanbddaima\2\mingriosft\1\020.C

     文件        463  2009-09-01 11:39  cyuyanbddaima\2\mingriosft\1\021.C

     文件        317  2009-09-01 11:40  cyuyanbddaima\2\mingriosft\1\022.C

     文件        422  2009-09-01 11:40  cyuyanbddaima\2\mingriosft\1\023.C

     文件       1392  2009-09-01 11:41  cyuyanbddaima\2\mingriosft\1\024.C

     文件        848  2009-09-01 11:42  cyuyanbddaima\2\mingriosft\1\025.C

     文件        684  2009-09-01 11:43  cyuyanbddaima\2\mingriosft\1\026.C

     文件        527  2009-09-01 11:43  cyuyanbddaima\2\mingriosft\1\027.C

     文件        846  2009-09-01 11:44  cyuyanbddaima\2\mingriosft\1\028.C

     文件       1231  2009-09-01 11:44  cyuyanbddaima\2\mingriosft\1\029.C

............此处省略621个文件信息

评论

共有 条评论