首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序的正确运行结果是( )。 #include<iostream.h> int fun(int); void main() { int a=2,i; for(i=0;i<3;i++) cout<<fun(
以下程序的正确运行结果是( )。 #include<iostream.h> int fun(int); void main() { int a=2,i; for(i=0;i<3;i++) cout<<fun(
admin
2013-05-30
84
问题
以下程序的正确运行结果是( )。 #include<iostream.h> int fun(int); void main() { int a=2,i; for(i=0;i<3;i++) cout<<fun(a)<<end1; cout<<end1; } int fun(int a) { int b=0; static int c=3; b++;c++; return(a+b+c); }
选项
A、4,5,6
B、6,7,9
C、7,8,9
D、7,7,7
答案
C
解析
转载请注明原文地址:https://www.kaotiyun.com/show/66Np777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
在下面程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。#include<iostream>usingnamespacestd;classA{public:A(){cout<<’A’;}
在下向程序和横线处填上适当的内容,使程序执行后的输出结果为1/2005。#include<iostream>usingnamespacestd;classDate{public:Date(intm=
在下面函数的横线处填上适当的内容使该函数能够利用递归方法求解字符串str的长度(不得使用系统提供的字符串处理函数)。intGetLen(char*str{if(【】)return【】;elseretur
下列程序在构造函数和析构函数中申请和释放类的私有成员,请完成该类的实现。classMyclass{public:Myclass(intnum);~Myclass();public:int*p;};
分析以下程序的执行结果【】。#include<iostream.h>classSample{intx,y;public:Sample(){x=y=0;}Sample(inta,intb){x=a;y=b;}~Sam
以下程序执行后的输出结果是【】。#include<iostream.h>main(){inti,m=0,n=0,k=0;for(i=9;i<=11;i++)switch(i/10){case0:m++;n++;break
下面程序的运行结果为【】。#include<iostream.h>voidmain(){chara=’3’;switch(a){case’3’:cout<<"3";case’2’:cout<<"2";break;defaul
在一个C++程序中,每个变量都必须遵循【】的原则。
随机试题
矿渣水泥与硅酸盐水泥、普通水泥相比具有的特性包括()。
A.asfishdoesB.oilC.bytheUnitedStatesinthe19thcenturyD.shinesdayandnightE.onlya
大多数情况下,陆地生态系统的净生产量大部分要进入食物链中的_______链。
用于胃肠道造影的对比剂是
关于构成比指标,描述正确的是
下肢静脉曲张剥脱术后病人应
离合器()
______hasbeenbroadlycharacterizedbyitsopennesstotradeandforeigninvestment?______hasastronglinkwiththeU.S.eco
说明:请以刘明的名义写一封求职信。时间:3月18日。内容:1.看到昨天《中国青年报》上招聘中文教师的广告,你想申请这份工作;2.你今年28岁,毕业于复旦大学中文系,获文学硕士学位;3.有3年的工作经验,之前在“华文”培训机构做中文教师,自
When,IfEver,CanMuseumsSellTheirWorks?Thedirectoroftheart-richyetcash-poorNationalAcademyMuseuminNewYork
最新回复
(
0
)