计算机二级C语言试卷及答案
2016年计算机二级C语言试卷及答案
计算机二级考试是全国计算机等级考试(National Computer Rank Examination,简称NCRE)四个等级中的一个等级,考核计算机基础知识和使用一种高级计算机语言编写程序以及上机调试的基本技能。考试采用全国统一命题,统一考试的形式,各科目均为上机操作考试。和十位的数字之和大于5的所有无符号整数,结果保存在数组yy中,其个数由函数proc返回。?例如,当arr[8]={13,1,205,252,2,333,4444,21)时实际输人时,数与数之间用Enter键分开,bb[4]={252,333,3、请补充函数proc(),该函数的功能是:把从主函数中输入的由数字字符组成的字符串转换成一个无符号长整数,并且逆序输出。结果由函数返回。例如,输入:1234567,结果输出:7654321。?4、请补充main()函数,该函数的功能是:打印出满足个位的数字、十位上的数字和百位上的数字都相等的所有3位数。?本题的结果为:111222?333?444?555?666?777?888?999。?
程序改错题(共100分)6、下列给定程序中,函数proc()的功能是:在字符串str中找出ASCⅡ码值最大的字符,将其放在第一个位置上,并将该字符前的原字符向后顺序移动。例如,调用proc()函数之前给字符串输入DcybkdGT,调用后字符串中的内容为试题程序:?试题程序:?
13、请编写函数proc(),其功能是:计算并输出下列多项式值。?S=(1+1/2)+(1/3+1/4)+…+(1/(2n-1)+1/2n)?例如,若输入10,则输出为S=3.597740。?n的值要求大于1但不大于100。?注意:部分源程序给出如下。?请勿改动函数main()和其他函数中的任何内容,仅在函数proc()的花括号中填入所编写的若干语句。?试题程序:?15、请编写函数proc(),它的功能是计算:?s=(1n(1)4-1n(2)+In(3)4-…+1n(m))0.5?在C语言中可调用log(n)函数求1n(n)。?例如,若n1的值为30,则proc()函数值为8.640500。?注意:部分源程序给出如下。?请勿改动main()函数和其他函数中的任何内容,仅在函数proc()的花括号中填入所编写的若干语句。?试题程序:?
family 7 being killed there. Zhu Xi forces, hundreds of people were killed and 19 captured fighters of their respective Corps Youth pioneers, opening of a temple by the Japanese military in ocean a thick wire through the Palm of each hand, pulled a long, red with the blood of the Earth. The face of the enemys power, captured 19 young men and women, none have ever been intimidated, no yield. Escort of the Japanese captain, kept shouting vicious Zhu Xi forces, an enemy of the Imperial Army, big bad! Japan helps you build a new order in East Asia, you see, as long as you repent and regret, in favour of Japan-China goodwill, is overkill. Enemy of 18 year old twin sisters are hypocritically surnamed Yao said: our youth, a lot of things are waiting for you, how can you quickly leave the world. In the face of enemy threats, seduce, 19 soldiers die, shouting: down with Japan imperialism! long live the nation! Ictus of times, fell to the enemy under the butc
原创力文档

文档评论(0)