小米路由器3和3c穿墙:江西省计算机二级C语言的一个题目。

来源:百度文库 编辑:高考问答 时间:2024/04/30 14:16:33
程序中fun的功能是查询字符 c在字符串str中是否存在。例如,若输入字符串为"string"而c为't',刚输出t。请将函数fun补充完整,使它能得出正确的结果。不得增行或删改,也不得更乞讨程序的结构。
#include"stdio.h"
#include"string.h"
#include"conio.h"
viod fun(char *str,char c)
{while(*str&&*str!=c)
(______1________);
if(*str==c)
{str[0]=c;
str[1]=(____2______);
}
printf("\n the result is %s\n",str);
}
viod main()
{char s[100],c;
clrscr();
printf("\n please enter astring:\n");
gets(s);
printf("\n please input a character:");
c=getche();
fun(s,c);
}
你那个应该是continue吧?
运行不了哦。还有哪位大侠可以帮我的?
求你们了。
明天我就要考试啦。
再过不了我就完了

contiue;
str[1]+1;