c语言数组与函数答案,C语言数组与函数阶段测试题答案---(最新整理)

《C语言数组与函数阶段测试题答案---(最新整理)》由会员分享,可在线阅读,更多相关《C语言数组与函数阶段测试题答案---(最新整理)(8页珍藏版)》请在人人文库网上搜索。

1、C 语言数组与函数阶段测试题答案一、选择题(18*2=36 分)1、在定义“int a56;”后,第 11 个元素是【C】A、a25B、a24C、a14D、a152、假定 int 类型变量占用两个字节,其定义:int x10=0,2,4;,则数组 x 在内存中所占字节数是【D】。A、3B、6C、10D、203、当接受用输入的含空格的字符串地,应使用的函数是【B】A、scanf()B、gets()C、getchar()D、getc()4、设有数组定义:char array=”China”;。则数组 array 所占的空间为【C】A、4 个字节B、5 个字节C、6 个字节D、7 个字节5、设有变量。

2、定义:int a = 1,2,3,4;执行语句 a3 = - - a0? a1 + + : a2 + +;执行后,数组的元素 a0, a1, a2, a3的值依次为【D】A、 1,2,3,4B、 0,3,3,4C、 0,2,3,4D、0,2,4,36、以下程序的输出结果是【C】void main( )int i, x33 = 1,2,3,4,5,6,7,8,9for(i= 0;i f(in b, int n) int i, r;r=1;for(i=0; ivoid main ( )char str =SSWLIA,c; int k;for (k=1;(c=strk)!=0;k+)switch 。

3、(c)case I: +k; break ; case L: continue;default : putchar(c) ; continue ;putchar(*);程序运行后的输出结果是【SW*】2、#include void fun(int x,int y)x=x+y; y=x-y;x=x-y; printf(%d,%d,x,y);main()int x=2,y=3; fun(x,y);printf(%d,%dn,x,y);程序运行后的输出结果是【3,2,2,3 】3#include int a33=1,2,3,4,5,6,7,8,9,b10;main()f(b,a); printf(%。

4、dn,b0);f(int s,int p 3)s0=p11;程序运行后的输出结果是【5】4、fun(int a, int b)if(ab) return a;elsereturn b;main()int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z);printf(%dn,r);程序运行后的输出结果是【12】5、#include int i=5;main()int i=3;int i=10; i+;f1(); i+=1;printf(%dn,i);int f1()i=i+1; return(i);程序运行后的输出结果是【4】6、int ff(int n)static in。

5、t f=1; f=f*n;returnf;main()int i; for(i=1;i main()int k=4,m=1,p;p=func(k,m); printf(%d,p);p=func(k,m);printf(%dn,p); func(int a,int b)static int m=0,i=2; i+=m+1;m=i+a+b;return (m);程序运行后的输出结果是三、程序填空(12*2.5=30)1 、下面程序求一个二维矩阵的最大值。# include #defineM3#defineN4intfindmax(inta N)int i, j, max = a00;for(i =。

6、 0; imax) max = aij;return (max); voidmain()int i, j, max,aMN; for(i = 0; i max)max=ai;c+;printf(%fn, (max1.0 * sum/c);“”“”At the end, Xiao Bian gives you a passage. Minand once said, people who learn to learn are very happy people. In every wonderful life, learning is an eternal theme. As a profess。

7、ional clerical and teaching position, I understand the importance of continuous learning, life is diligent, nothing can be gained, only continuous learning can achieve better self. Only by constantly learning and mastering the latest relevant knowledge, can employees from all walks of life keep up with the pace of enterprise development and innovate to meet the needs of the market. This document is also edited by my studio professionals, there may be errors in the document, if there are errors, please correct, thank you。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
【优质项目推荐】 1、项目代码均经过严格本地测试,运行OK,确保功能稳定后才上传平台。可放心下载并立即投入使用,若遇到任何使用问题,随时欢迎私信反馈与沟通,博主会第一时间回复。 2、项目适用于计算机相关专业(如计科、信息安全、数据科学、人工智能、通信、物联网、自动化、电子信息等)的在校学生、专业教师,或企业员工,小白入门等都适用。 3、该项目不仅具有很高的学习借鉴价值,对于初学者来说,也是入门进阶的绝佳选择;当然也可以直接用于 毕设、课设、期末大作业或项目初期立项演示等。 3、开放创新:如果您有一定基础,且热爱探索钻研,可以在此代码基础上二次开发,进行修改、扩展,创造出属于自己的独特应用。 欢迎下载使用优质资源!欢迎借鉴使用,并欢迎学习交流,共同探索编程的无穷魅力! 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip 基于业务逻辑生成特征变量python实现源码+数据集+超详细注释.zip

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值