皮皮学,免费搜题
登录
搜题
【简答题】
请补充函数fun(),该函数的功能是:把字符串str中的字符按字符的ASCⅡ码降序排列,处理后的字符串仍然保存在,字符串及其长度作为函数参数传入。 例如,如果输入“cdefgh”,则输出为“hgfedc”。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。 试题程序: include <stdio.h> define N 80 void fun (char s [], int n) { int i, j; char ch; for (i=0; i<n; i++) for(j=【 】;j<n;j++) if (s[i]<s [j]) { ch=s [j]; 【 】; s [i] =ch; } main ( ) { int i=0, strlen=0; char str [N]; clrscr (); printf ('/nInput a string: /n'); gets (str); while (str [i] !=' /0') { strlen++; i++; } fun (str, strlen); printf ('/n***display string ***/n'); puts (str); }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【简答题】I got a job offer from an organization working on protecting animals_____ with extinction ( 灭绝 ). 2.I am sorry to say that from the start their plan seemed_____ to failure. 3.The European and Arab cou...
【简答题】The professor is seemed to be happy with his student’s answer.
【简答题】浅谈我国国家预算的构成及相应层次?
【简答题】由E.coli的λ噬菌体作为遗传工程中的载体,具备以下五个优点:______,______,______,______和______。
【简答题】由 E. coli的λ噬菌体作为遗传工程中的载体,具备哪些优点?
【判断题】温度和光照是影响作物发育特性的最重要的因素。
A.
正确
B.
错误
【单选题】The long speech given by the old professor seemed _____ and endless. He felt so ______ that he nearly fell asleep. [     ]
A.
disappointed ; boring
B.
disappointed ; bored
C.
disappointing ; bored
D.
disappointing ; boring
【简答题】浅谈我国国家预算的构成及相应层次? 2、浅谈会计职业道德与会计法律的关系? 3、浅谈会计职业道德的内容?
【简答题】I got a job offer from an organization working on protecting animals threatened with extinction. 2. I am sorry to say that from the start their plan seemed doomed to failure. 3. The European and Arab ...
【单选题】The long speech given by that old professor seemed _____ and endless. He felt so _____ that he nearly fell asleep.
A.
disappointed; boring
B.
disappointed; bored
C.
disappointing; bored
D.
disappointing; boring
相关题目: