昆明理工大学c语言上机操作答案,!昆明理工大学C语言程序设计模拟试卷2_附答案...

fd

昆明理工大学 2014 年补考卷

填空题(共 20 分,每空 2 分)

1. 以下程序实现输出 x、y、z 三个数中的最小者。 main() { int int if else else if(u

xx

printf("v=%d",v); #include main() { FILE { *fp; long

2. 下面的程序用变量 count 统计文件 letter.dat 中字符的个数。

count=0; "r" (3) ))==NULL) open count file \n");exit(0); } (4) );

if((fp=fopen("letter.dat", printf("cannot while(!feof(fp)) fclose(fp); #include main() { int digits =0,c; while(( c=getchar() (6) " } stdio.h (5)

{ fgetc(fp), count++ ; }

printf("count=%ld \n",

3. 下面程序是从键盘输入的字符中统计数字字符的个数,请填空。 "

)!='*') }

if(c>='0' && c<='9')

digits++;

printf("%d\n", digits); int a=5; int b=7; main() { int c; c=plus( } plus( { int z; (8) int x,int y z=x+y;

4. 下面程序利用函数 plus 求变量 a 与 b 的和,请填空并。

a,b (7)

);

printf("A+B=%d\n",c); )

return z;}

5. 用选择法对从键盘输入的 10 个浮点数进行排序。 main() { float a[10],temp; float

*fp=a

(9)

; int i,j;

1-1426-jpg_6_0_______-881-0-0-881.jpg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值