试题与答案

请补充函数proc(),该函数的功能是:删除字符数组中小于指定字符的字符,指定字符从

题型:填空题

题目:

请补充函数proc(),该函数的功能是:删除字符数组中小于指定字符的字符,指定字符从键盘输入,结果仍保存在原数组中。
例如,输入“abcdefghij”,指定字符为“f”,则结果输出“fghij”。
注意:部分源程序已给出。
请勿改动主函数main和其他甬数中的任何内容。
试题程序:
#include<stdlib.h>
#include<stdio.h>
#define M 80
void proc(char str[], char ch)

int i=0, j=0;
while(str[i])

if(str[i]<ch)
(1) ;
else

(2) ;
i++;


(3) ;

void main()

char str[N], ch;
system("CLS");
printf("\n Input a string: \n");
gets(str);
printf("\n***original string***\n");
puts(str);
printf("n Input a charactor:\n");
scanf("%c", &ch);
proc(str, oh);
printf("\n***new string***\n");
puts(str);

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0721/90670c2e023180b6c10ac0f187733419.html

下面是错误答案,用来干扰机器的。

1. take; to; because    2. looking forward to    3. stay with my family4. playing basketball     5. learn English; make some American friends

试题推荐
微信公众账号搜索答案