填空题   给定程序中,函数fun的功能是:将形参s所指字符串中所有ASCII码值小于97的字符存入形参t所指字符数组中,形成一个新串,并统计出符合条件的字符个数作为函数值返回。
    例如,形参s所指的字符串为:Abc@1x56*,程序执行后t所指字符数组中的字符串应为:A@156*。
    注意:不得增行或删行,也不得更改程序的结构!
    试题程序:
    #include <stdio.h>
    int fun(char *s,char *t)
    {int n=0;
    while(*s)
    {if(* s<97){
    /*********found*********/
    *(t+n)=______;n++;}
    /*********found*********/
    ______;
    }
    *(t+n)=0;
    /*********found*********/
    return ______;
    main()
    {char s[81],t[81];int n;
    printf('\nEnter a string:\n');
    gets(s);
    n=fun(s,t);
    printf('\nThere are % d letter which ASCII code is less than 97:% s\n',n,t);
    }
 
【正确答案】
【答案解析】填空1:判断s所指向的字符串中的字符符合条件时,将当前字符存放到t指向的字符串中,所以应填*s。 填空2:判断完一个字符之后,将字符串的指针移到下一个位置,所以应填s++。 填空3:题目要求函数要返回符合条件的字符个数n,所以应填n。