全国计算机等级考试二级C机试试题17
一、填空题
下列给定程序中,函数fun的功能是:从形参ss所指字符串数组中,删除所有串长超过k的字符串,函数返回剩余字符串的个数。ss所指字符串数组中共有N个字符串,且串长小于M。
请在下划线处填入正确的内容并将下划线删除,使程序得出正确的结果。
注意:部分源程序在文件BLANK1.C中。
不得增行或删行,也不得更改程序的结构!
#include
#include
#define N 5
#define M 10
int fun(char (*ss)[M], int k)
{ int i,j=0,len;
/**********found**********/
for(i=0; i< __1__ ; i++)
{ len=strlen(ss[i]);
/**********found**********/
if(len<= __2__)
/**********found**********/
strcpy(ss[j++],__3__);
}