下列给定程序中,函数fun()的功能是:在字符串str中找出ASCII码值最大的字符

题型:填空题

问题:

下列给定程序中,函数fun()的功能是:在字符串str中找出ASCII码值最大的字符,将其放在第一个位置上,并将该字符前的原字符向后顺序移动。例如,调用fun()函数之前给字符串输入ABCDeFGH,调用后字符串中的内容为 eABCDFGH。
请改正程序中的错误,使它能得出正确的结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。
试题程序:
#include<stdio.h>
/***************found************/
fun(char *p)
char max, *q;int i=0;
max=p[i];
while (p[i]!=0)
if (max<p[i])

/***************found************/
p = q +i;max=p[i];

i++;

/***************found************/
while (q<p)
*q=*(q-1);
q--;

p[0]=max;

main()
char str[80];
printf("Enter a string: "); gets(str);
printf("\nThe original string: ");
puts(str);
fun(str);
printf("\nThe string after moving: ");
puts(str); printf("\n\n");

考点:计算机等级考试C语言二级C语言机试
题型:填空题

蒋女士夫妇婚后6年未孕,到辅助生殖中心就诊。

上述检查报告提示:子宫和卵巢功能无明显异常,刘医生考虑下一步将做的检查是()。

A.肺部摄片

B.心电图

C.输卵管通畅检查

D.宫颈活体检查

E. * * 镜检查

题型:填空题

完形填空 (共10小题;每小题2分,满分20分)

阅读下面短文,掌握其大意,然后从21—30各题所给的A、B、C和D项中,选出最佳选项,并在答题卡上将该项涂黑。

Do you find getting up in the morning so difficult that it’s painful? This might be called  21 , but Dr. Kleitman has a new  22 . He has proved that everyone has a   23   energy cycle. During the hours when you   24   through your work you may say that you’re “hot”. That’s  25  . The time of day when you feel most   26   is when your cycle of body temperature is at its peak. For some people the  27   comes during the forenoon. For others it comes in the afternoon or evening. No one has discovered why this is so, but it  28   such familiar monologues as: “Get up, John! You’ll be late for work again!” The possible explanation to the trouble is that John is at his temperature-and-energy peak in the   29 . Much family quarrelling ends when husbands and wives  30  what these energy cycles mean, and which cycle each member of the family has. You can’t change your energy cycle, but you can learn to make your life fit it better.

21. A. patience    B. laziness      C. sadness       D. comfort

22. A. discovery   B. invention     C. explanation    D. statement

23. A. changing    B. increasing    C. full          D. daily

24. A. labour      B. get          C. go            D. look

25. A. honest      B. actual       C. true           D. real

26. A. pleasant     B. energetic    C. excited        D. comfortable

27. A. power      B. energy       C. peak           D. altitude

28. A. comes to    B. gets to       C. leads to        D. refers to

29. A. morning    B. afternoon     C. evening        D. noon

30. A. realize      B. recognize     C. memorize      D. see

题型:填空题

依照我国《证券投资基金法》规定,基金管理公司主要股东的注册资本不得低于()人民币。

A、3亿元

B、2亿元

C、1亿元

D、5000万元

题型:填空题

金融理财师小陈的客户王某与妻子2000年1月登记结婚。现王某准备离婚。王某知道夫妻共有财产应在离婚时由夫妻双方分割,但对于哪些财产属于夫妻共有财产拿不准,于是向小陈咨询。以下财产中,不属于夫妻共有财产的是()。

A.2002年5月王某父亲去世,未留遗嘱,王某继承了父亲留下的一套住房

B.2007年3月,张某驾车撞伤王某,王某获得的2万元医疗费赔偿

C.王某未与妻子协商,每月从工资中拿出5 000元委托理财所产生的3万元收益

D.2009年王某获得一项专利,2010年5月王某通过转让该专利获利50万元

题型:填空题

金融机构协助扣划时,应当将扣划的存款直接划入有权机关指定的账户。有权机关要求提取现金的,必须出示法院的正式公函。

更多题库