电大计算机C语言1253,电大1253+C语言程序设计A(7月)小抄参考1

《电大1253+C语言程序设计A(7月)小抄参考1》由会员分享,可在线阅读,更多相关《电大1253+C语言程序设计A(7月)小抄参考1(8页珍藏版)》请在人人文库网上搜索。

1、C语言程序设计A课程试卷(6)题 号一二三四五总 分得 分2011年7月考一、单选题(每小题2分,共20分)1. C语言程序中的基本功能模块为( )。A. 表达式 B. 标识符 C. 语句 D. 函数2. 逻辑表达式(x0 | y=5)的相反表达式为( )。A. x0 | y!=5 D. x0 & y=53. 循环体至少被执行一次的循环语句为( )。A. for B. while C. do-while D. 任一种循环4. 假定n的值为5,则表达式n+的值为( )。A. 6 B. 5 C. 4 D. 75. 假定一个二维数组的定义为“int a34=3,4,2,8,6;”,则元素a20的值为。

2、( )。A. 0 B. 2 C. 4 D. 66. 假定一个函数原型为“char* func(int n)”,则该函数的返回类型为( )。A. int B. int* C. char D. char*7. 假定a为一个字符数组名,则元素ai的指针访问方式为( )。A. a+i B. *(a+i) C. &a+i D. *a+i 8. 假定有语句为“int *p=calloc(10+20,sizeof(int);”,则p所指向的动态数组中所包含的元素个数为( )。A. 10 B. 20 C. 30 D. 409十进制数50表示成符合C语言规定的八进制数为________。A. 20 B. 32 。

3、C. 62 D. 06210. 若要以读和写两种操作方式打开一个二进制文件,当文件不存在时返回打开失败信息,则选用的打开方式字符串为( )。A. r+ B. ab+ C. rb+ D. wb+二、填空题(每小题2分,共26分)1. 在一个C语言程序文件中,若要包含另外一个头文件或程序文件,则应使用的预处理命令为__________。2. 用于从键盘上为变量输入值的标准输入函数的函数名为________。3. 假定一个枚举类型的定义为“enum RAab,ac,ad,ae;”,则ac的值为________。4double类型的长度为________。5. 执行“int x=45,y=13;pri。

4、ntf(%d,x/y);”语句序列后得到的输出结果为________。6. 把表达式x=x+y转换成复合赋值表达式为__________。7. 假定x的值为5,则执行“a=(!x? 10: 20);”语句后a的值为________。 8. 假定一维字符指针数组的定义为“char* a8;”,则该数组占用的存储空间的字节数为________。9. 假定二维数组的定义为“double aMN;”,则数组元素的行下标取值范围在_________之间。10. 空字符串的长度为________。11. 在所有函数定义之外定义的变量,若没有被初始化则系统隐含对它所赋的初值为________。12. 若p指。

5、向x,则________与x的表示是等价的。13. 直接访问表达式(*fp).score所对应的间接访问表达式为____________。三、写出下列每个程序运行后的输出结果(每小题6分,共30分)1. #includevoid main() int i,j,k=0;for(i=0; ivoid main() int x=20;int i=2;while(ivoid main() int a8=76,63,54,95,40,75,90,66;int i, s=0;for(i=0; i=70 & aiint WF(int x, int y) x=x+y;y+=x;return x+y;void 。

6、main() int x=3, y=8;printf(%dn,WF(x,y);5. #includeint LA(int *a, int n) int i,s=0;for(i=0;i=k) c+;return c; 函数功能:2. void QA(struct Worker a, int n) int i;for(i=0; iscore三、写出下列每个程序运行后的输出结果(每小题6分,共30分)评分标准:根据答案正确程度酌情给分。1. 152. 2 53. s=2414. 305. b=27四、写出下列每个函数的功能(每小题6分,共12分)评分标准:根据答案叙述正确与完整程度酌情给分。1. 统。

7、计并返回一维整型数组an中大于等于k的值的个数。2. 从键盘上为具有struct Worker类型的数组an输入n个记录。五、按题目要求编写函数(每小题6分,共12分)评分标准:根据函数编写的正确与完整程度酌情给分。1. double Mean(double aMN,int m,int n)int i,j;double v=0.0; /1分for(i=0; ix1) x1=ai; /3分if(aix2) x2=ai; /4分 /5分return x1-x2; /6分Winger Tuivasa-Sheck, who scored two tries in the Kiwis 20-18 sem。

8、i-final win over England, has been passed fit after a lower-leg injury, while Slater has been named at full-back but is still recovering from a knee injury aggravated against USA.Both sides boast 100% records heading into the encounter but Australia have not conceded a try since Josh Charnleys effor。

9、t in their first pool match against England on the opening day.Aussie winger Jarryd Hayne is the competitions top try scorer with nine, closely followed by Tuivasa-Sheck with eight.But it is recently named Rugby League International Federation player of the year Sonny Bill Williams who has attracted。

10、 the most interest in the tournament so far.The Kiwi - with a tournament high 17 offloads - has the chance of becoming the first player to win the World Cup in both rugby league and rugby union after triumphing with the All Blacks in 2011.Id give every award back in a heartbeat just to get across th。

11、e line this weekend, said Williams.The (lack of) air up there Watch mCayman Islands-based Webb, the head of Fifas anti-racism taskforce, is in London for the Football Associations 150th anniversary celebrations and will attend Citys Premier League match at Chelsea on Sunday.I am going to be at the m。

12、atch tomorrow and I have asked to meet Yaya Toure, he told BBC Sport.For me its about how he felt and I would like to speak to him first to find out what his experience was.Uefa hasopened disciplinary proceedings against CSKAfor the racist behaviour of their fans duringCitys 2-1 win.Michel Platini, 。

13、president of European footballs governing body, has also ordered an immediate investigation into the referees actions.CSKA said they were surprised and disappointed by Toures complaint. In a statement the Russian side added: We found no racist insults from fans of CSKA. Baumgartner the disappointing。

14、 news: Mission aborted.The supersonic descent could happen as early as Sunda.The weather plays an important role in this mission. Starting at the ground, conditions have to be very calm - winds less than 2 mph, with no precipitation or humidity and limited cloud cover. The balloon, with capsule atta。

15、ched, will move through the lower level of the atmosphere (the troposphere) where our day-to-day weather lives. It will climb higher than the tip of Mount Everest (5.5 miles/8.85 kilometers), drifting even higher than the cruising altitude of commercial airliners (5.6 miles/9.17 kilometers) and into。

16、 the stratosphere. As he crosses the boundary layer (called the tropopause),e can expect a lot of turbulence.The balloon will slowly drift to the edge of space at 120,000 feet (Then, I would assume, he will slowly step out onto something resembling an Olympic diving platform.They blew it in 2008 whe。

17、n they got caught cold in the final and they will not make the same mistake against the Kiwis in Manchester.Five years ago they cruised through to the final and so far history has repeated itself here - the last try they conceded was scored by Englands Josh Charnley in the opening game of the tourna。

18、ment.That could be classed as a weakness, a team under-cooked - but I have been impressed by the Kangaroos focus in their games since then.They have been concentrating on the sort of stuff that wins you tough, even contests - strong defence, especially on their own goal-line, completing sets and a g。

19、ood kick-chase. Theyve been great at all the unglamorous stuff that often goes unnoticed in the stands but not by your team-mates.It is as though their entire tournament has been preparation for the final.In Johnathan Thurston, Cooper Cronk, Cameron Smith and either Billy Slater or Greg Inglis at fu。

20、ll-back they have a spine that is unmatched in rugby league. They have played in so many high-pressure games - a priceless asset going into Saturday.The Kiwis are a lot less experienced but winning a dramatic match like their semi-final against England will do wonders for their confidence.They defeated Australia in the Four Nations final in 2010 and the last World Cup, and know they can rise to the big occasion。


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部