题目内容

给定程序中,函数fun()的功能是将s所指字符串中的所有数字字符移到所有非数字字符之后,并保持数字字符串和非数字字符串原有的先后次序。例如,形参s所指的字符串为def35adh3kjsdf7,执行结果为defadhkjsdf3537。 请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。 注意:源程序存放在考生文件夹下的BLANK1.C中。不得增行或删行,也不得更改程序的结构。 #include<stdio.h> void fun(char *s) int i,j=0,k=0;char t1[80],t2[80]; for(i=0;s[i]!=’\0’;i++) if(s[i]>=’0’0&&s[i]<=’9’) /**********found**********/ t2[j]=s[i]; (1) ; else t1[k++]=s[i]; t2[j]=0;t1[k]=0; /**********found**********/ for(i=0;i<k;i++) (2) ; /**********found**********/ for(i=0;i< (3) ;i++)s[k+i]=t2[i]; main() char s[80]="ba3a54j7sd567sdffs"; printf("\nThe original string is:%s\n",s); fun(s); printf("\nThe result is:%s\n",s);

查看答案
更多问题

给定程序MODI1.C中函数fun()的功能是:将p所指字符串中每个单词的最后一个字母改成大写(这里的“单词”是指由空格隔开的字符串)。 例如,若输入”I am a student to take the examination.”,则应输出”I aM A studenT tO takE thE examination.”。 请修改程序中的错误之处,使它能得出正确的结果。 注意:不要改动main()函数,不得删行,也不得更改程序的结构。 #include<ctype.h> #include<stdio.h> #include<string.h> void fun(char *p) int k=0; for(; *p;p++) if(k) /**********found**********/ if(p==’’) k=0; /**********found**********/ *(p)=toupper(*(p-1)) else k=1; main() char chrstr[64]; int d; printf("\nPlease enter an English sentence within 63 letters:"); gets(chrstr); d=strlen(chrstr); chrstr[d]=’’; chrstr[d+1]=0; printf("\n\nBefore changing:\n %s",chrstr); fun(chrstr); printf("\nAfter changing:\n%s",chrstr);

国际招标采购货物,招标文件约定报价采用到岸价(CIF),且评标价格的调整因素有延迟交货按照货物投标价格的每周0.5%折价;提前或延迟付款按月利率1%折价;按照开标当日中国人民银行授权公布的欧元对美元的中间价1:1.4转换成美元的评标价格;货物进口环节综合税率为到岸价的25%。某投标人的投标价格为9500000欧元,评标中发现其报价多计算50000欧元,交货期比招标要求延迟2周,且有300000欧元货款要求提前1个月支付,内陆运输费、保险费及其他伴随服务费用28500美元。 [问题] 计算该投标人的评标价格。

What does the driver mean [A] He’ll try his best. [B] He cannot because there are so many cars at this hour. [C] He doesn’t like driving fast.

What’s the probable relationship between the two speakers

A. Teacher and student.
B. Husband and wife.
C. Doctor and patient.

答案查题题库