下列给定程序中,函数fun()的功能是:读人一个字符串(长度<20),将该字符串中的所有字符按ASCⅡ码降序排序后输出。
#include<stdio.h>
void fun(char t[])
{
char c;
int i,j;
for(i=0;______;i++)/*第一空*/
for(j=i+1;j<=strlen(t);j++)
if(______)/*第二空*/
{
c=t[j];
t[j]=t[i];
t[i]=c;
}
}
main()
{
char s[81];
print f("Please enter a char acter string:\n");
gets(s);
print f("\n\nBefore sorting:\n%s",s);
______;/*第三空*/
print f("\nAfter sorting decreasingly:\n%s\n",s);
}