填空题
给定程序中,函数fun的功能是:在形参ss所指字符串数组中,将所有串长超过k的字符串中右边的字符删除,只保留左边的k个字符。ss所指字符串数组中共有N个字符串,且串长小于M。
请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。
不得增行或删行,也不得更改程序的结构!
给定源程序:
#include<stdio.h>
#include<string.h>
#define N 5
#define M 10
/**********found**********/
void fun(char(*ss)______,int k)
{int i=0;
/**********found**********/
while(i<______){
/**********found**********/
ss[i][k]=______;i++;}
}
main()
{char x[N][M]={'Create','Modify','Sort','skip','Delete'};
int i;
printf('\nThe original string\n\n');
for(i=0;i<N;i++)puts(x[i]);printf('\n');
fun(x,4);
printf('\nThe string after deleted:\n\n');
for(i=0;i<N;i++)puts(x[i]);printf('\n');
}