首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列函数的功能是______。 #include<iostream.h> int Func(int a,int b) { if(a>B)return 1; else if(a= =B)return 0;
下列函数的功能是______。 #include<iostream.h> int Func(int a,int b) { if(a>B)return 1; else if(a= =B)return 0;
admin
2010-12-16
58
问题
下列函数的功能是______。
#include<iostream.h>
int Func(int a,int b)
{
if(a>B)return 1;
else if(a= =B)return 0;
else return -1;
}
选项
答案
比较两个整数a和b的大小,若a>b则返回1,若a等于b,则返回0,否则返回-1。
解析
转载请注明原文地址:https://kaotiyun.com/show/kFVp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
设变量均已正确定义,若要通过scanf(“%d%c%d%c”,&a1,&c1,&a2,&c2);语句为变量a1和a2赋数值10和20,为变量c1和c2赋字符X和Y。以下所示的输入形式中正确的是()。(注:口代表空格字符)
有以下程序#include<stdio.h>#include<string.h>structA{inta;charb[10];doublec;};structAf(structAt);
请阅读以下程序:#include#includevoidfun(intb[])main(){staticinti=0;{intk,a[5]={1,3,5,4,9};Do{
有以下程序:#include<stdio.h>Structst{intx,y;}data[2]={1,10,2,20};main(){structst*p=dat
使用VC++2010打开考生文件夹下modi1中的解决方案。此解决方案的项目中包含一个源程序文件modi1.c。在此程序中,函数fun的功能是:从s所指字符串中,找出t所指字符串的个数作为函数值返回。例如,当s所指字符串中的内容为“abcdabfab”,t
下述语句中,在字符串s1和s2相等时显示”theyareEqual”的是()。
有以下程序#includeintm1(intx,inty){returnx
语句“printf("a\bhow\’are\’y\\\bou\n");”的输出结果是()。
随机试题
患者女,30岁。平时无出血倾向,食欲良好。实验室检查:红细胞3×1012/L,Hb为90g/L,WBC为8×109/L。血清总胆红素为82μmol//L,非结合胆红素为62μmo/L,ALT为20U,AIP为10U。此患者黄疸可能属于
根据《保护工业产权的巴黎公约》,关于优先权,下列哪一选项是正确的?()
所有的明细账,年底时必须更换成新账本。()
“投资收益”科目的贷方用来记录()。
基金宣传材料可以含有的信息是()。
犯罪法定最高刑为5年有期徒刑的,其追诉期限为()。
Readthefollowingarticleinwhich.fivepeopletalkabouttheirtimearrangement.ForQuestions61to65,matchnameofeach
Asalways,IampleasedtobehereattheNationalPressClubformy【L1】______Speech.ThisistheseventhtimeIhavehadthe【L2
WhentheAmericanpsychologistWayneOatesdiedin1999,TheNewYorkTimesbeganhisobituarybynotingtwofacts.First,them
Theparty,______Iwastheguestofhonour,wasextremelyenjoyable.
最新回复
(
0
)