题目:c语言填充代码-创新互联

Sample output:

专注于为中小企业提供做网站、成都网站建设服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业南和免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上千企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。

Input the string : this a test

Input the substring to be search : test

The substring exists in the string.

1. [K/U: /2] Explain the logic that you may apply to complete the code.

2. [T: /2] Create a flowchart based in the program requirement.

3. [A: /2] Write the missing code.

4. [C: /2] Explain the functions used in the code.

#includevoid main()

{

char str[80],search[20];

int c1=0,c2=0,i,j,flg;

printf("Input the string : ");

fgets(str, sizeof str, stdin);

printf("Input the substring to be search : ");

fgets(search, sizeof search, stdin);

while (str[c1]!='\0')

c1++;

c1--;

while (search[c2]!='\0')

c2++;

c2--;

for(i=0;i<=c1-c2;i++)

{

//missing code

}

if (flg==1)

printf("The substring exists in the string.\n\n");

else

printf("The substring is not exists in the string. \n\n");

}

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


网页名称:题目:c语言填充代码-创新互联
转载来于:http://myzitong.com/article/dgoddi.html