vc编程与应用试卷及答案

vc编程与应用试卷及答案

ID:37395084

大小:72.50 KB

页数:9页

时间:2019-05-23

vc编程与应用试卷及答案_第1页
vc编程与应用试卷及答案_第2页
vc编程与应用试卷及答案_第3页
vc编程与应用试卷及答案_第4页
vc编程与应用试卷及答案_第5页
资源描述:

《vc编程与应用试卷及答案》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、学院、系专业班级学号姓名······························密································封·······························线···································《VC编程与应用》期末考试试卷(A卷)(本试卷共6页)题号一二三四总分得分得分阅卷人一、选择题(本题满分20分,每小题各2分)题号12345678910答案1.下列标识符合法的是()。A.2xyB.#5f68C._YearsD.return2.下列()是语句。A.;;B.x+yC.a=12;D

2、.cout<<””3.在C++中,未对函数类型加以说明,则函数的隐含类型是()A.voidB.doubleC.intD.char4.下列循环for(inti=0,x=0;!x&&i<=5;i++)中的循环次数是()。A.5B.6C.1D.无限5.下列标识符中,()不是局部变量。A.register类B.auto类C.外部static类D.函数形参6.预处理命令在程序中都以()开头的。A.*B.#C.:D./7.下列数组声明错误的是()。A.#definen5B.constintn=5;chara[n]={“Good”};chara[n]={“Good”};C.intn=

3、5;D.constintn=5;chara[n]={“Good”};chara[n+2]={“Good”};9学院、系专业班级学号姓名······························密································封·······························线···································8.有以下定义:int(*q)[3]=newint[2][3];则下列对数组的引用正确的是()A.*qB.*(*(q+2)+3)C.*qD.q[2][3]9.已知,intm=10;下列

4、表示引用的方法,正确的是()A.int&x=m;B.int&y=10;C.int&z;D.float&t=&m;10.下述程序片段的输出是()。inta[3][4]={{1,2,3,4},{5,6,7,8}};intx,*p=a[0];x=(*p)*(*p+2)*(*p+4);cout<

5、·················密································封·······························线···································4.什么是对话框?它分为哪两类?这两类对话框有哪些不同?5.什么是按钮控件?它有几种类型?6.状态栏的作用是什么?状态栏的窗格分为几类?得分阅卷人三、程序分析题(本题满分20分,1,2题6分,3题8分)1.请将下列程序补充完整,使得输入一个4位整数,将各位数字分开,并按其反序输出,要求使用递归函数。#includevo

6、idconvert(intn){inti;cout<<(char)(n%10+'0');if((i=n/10)!=0)_________________________9学院、系专业班级学号姓名······························密································封·······························线···································}intmain(){intnNum;cout<<"请输出一个整数:";cin>>nNum;cout<<"输出的是:";if

7、(nNum<0){cout<<'-';_________________________}convert(nNum);cout<intmain(){for(intn=1;n<=15;n++){intflag=1;for(inti=2;i<=n/2;i++){if(n%i==0){flag=0;break;}}if(flag)cout<

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。