下列给定程序中,函数fun()的功能是:读入一个字符串 (长度<20),将该字符串中的所有字符按ASCII码降序排序后输出。 例如:输入dafhc,则应输出hfdca。 请改正程序中的错误,使它能得到正确结果。 注意:不要改动main函数,不得增行或删行,敢不得更改程序的结构。 试题程序: #include <conio.h> #include <stdio.h> /*************found**************/ int fun(char t[ ]) { char c; int i,j; for(i=0;i<strlen(t)-1;i++)for(j=i+1;i<strlen(t);j++) if(t[i]<t[j]) { c=t[j]; /*************found**************/ t[i]=t[i++]; t[i]=c; } } main() { char s[81]; clrscr(); printf("\nPlease enter a character string:"); gets(s); printf("\n\nBefore sorting:\n%S",s); fun(s); printf("\nAfter sorting decendingly:\n %s",s); }