注意:源程序存放在考生文件夹下的BLANK1.C中。
不得增行或删行,也不得更改程序的结构!
给定源程序:
#include
#include
#define N 5
#define M 8
int fun(char (*ss)[M],char *t)
{ int i;
for(i=0; i< __1__ ; i++)
if(strcmp(ss[i],t)==0 ) return __2__ ;
return -1;
}
main()
{ char ch[N][M]={"if","while","switch","int","for"},t[M];
int n,i;
printf("\nThe original string\n\n");
for(i=0;i
n=fun(ch,t);
if(n== __3__) printf("\nDon’t found!\n");
else printf("\nThe position is %d .\n",n);
}