首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的输出结果是 #include" iostream" using namespace std; int Max(int a,int b) { if(a > b) else return a; e
下列程序的输出结果是 #include" iostream" using namespace std; int Max(int a,int b) { if(a > b) else return a; e
admin
2013-02-27
15
问题
下列程序的输出结果是 #include" iostream" using namespace std; int Max(int a,int b) { if(a > b) else return a; else retum b; } void main( ) { int m,n; m=10,n=5; int max=Max(m,n); cout < < max < < end
选项
A、10
B、程序有误
C、1
D、0
答案
1
解析
本题函数Max的功能是求出两个整数中的较大者,并且通return语句返回。注意:retum语句的用法,注意return的条件。
转载请注明原文地址:https://kaotiyun.com/show/FeVp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
有以下程序 #include<stdio.h> main() { intw=4,x=3,y=2,z=1; printf("%d\n",(w<xw:z<yz:x)); } 程序运行后的输出结果是()。
以下给定程序中,函数fun的功能是:判断输入的任何一个正整数n,是否等于某个连续正整数序列之和。若是,则输出所有可能的序列。否则输出“不能分解”。例如,当输入100时,输出:100=9+10+11+12+13+14+15+16100=18+19+20
下列给定程序中,fun函数的功能是:根据形参m,计算下列公式的值。t=1+1/2+1/3+1/4+…+1/m例如,若输入5,则应输出2.283333。请改正程序中的错误,使它能得出正确的结果。注意:不要改动main函数,不得增行或删行,也不得更改程
在C语言中,只有在使用时才占用内存单元的变量的是()。
当循环队列非空且队尾指针等于队头指针时,说明循环队列已满,不能进行人队运算。这种情况称为【】。
下面关于成员函数重载运算符和友元函数重载运算符相同的是()。
下列关于运算符重载不正确的是()。
数据结构分为逻辑结构和存储结构,循环队列属于【】结构。
白盒测试法的覆盖标准有逻辑覆盖、循环覆盖和【】。
循环链表的主要优点是()。
随机试题
MaryArming(1799—1847)wasaBritishfossilhunterwhobeganfinding【21】asachild,andsoonsupportedherselfandhervery【22】
关于腰椎前后位成像技术标准的叙述,不正确的是
某外商投资企业银行存款(美元)账户上期期末余额为50000美元,上期末市场汇率为1美元=6.30元人民币,该企业外币交易采用当日市场汇率折算,该企业本月10日将其中10000美元在银行兑换为人民币,银行当日美元买入价为1美元=6.25元人民币,当日市场汇率
中国电信行业经历了三次重大改革后,从完全垄断走向寡头竞争格局。但是。行业垄断状况依然严重。在移动市场上,中国移动“一家独大”,在宽带市场上,中国电信和中国联通南北垄断。中国电信行业仍然是政府管制下的强垄断市场,其强垄断状况将电信资费维持在较高的水平,不仅降
下列对子网系统的防火墙的描述错误的是
ComputertechnologyhasmadecheckingdictionarieswritteninChineseamuchmore(i)______task.SincetheChineselanguagesdid
ProductionoftheAmbassador,thefirstcartobemadeinIndia,hasbeenhaltedbecauseoffallingdemand.ModelledontheMorr
Yourweightaffectshowlongyoulive—butit’sextremelycomplicatedA)Weoftenthinkaboutweightlossintheshortterm,h
A、Soughtafterbytoomanypeople.B、Toodifficultforyoungpeople.C、Forambitiouspeopleonly.D、Foryoungpeopleonly.A
A、Becausehedislikedhisradio.B、Becausehedidn’treturntheradiotothewoman.C、Becausehelefthisradiotooloud.D、Beca
最新回复
(
0
)