【单选题】【消耗次数:1】
设有函数T Sum(T x,T y){return x+y;},其中T为模板类型,则下列语句中对该函数错误的使用是( )
Sum(1,2);
Sum(0,2);
Sum(‘A’,‘C’);
Sum(A,C);
参考答案:
复制
纠错
相关题目
【单选题】 设有函数T Sum(T x,T y){return x+y;},其中T为模板类型,则下列语句中对该函数错误的使用是( )
①  Sum(1,2);
②  Sum(0,2);
③  Sum(‘A’,‘C’);
④  Sum(A,C);
【单选题】 设有函数模板templateQ Sum(Q x,Q y) {return (x)+(y);} 则下列语句中对该函数模板错误的使用是()
①  Sum(10,2);
②  Sum(0,7);
③  Sum(2f,0f);
④  Sum(“AB”,”CD”);
【单选题】 设有函数模板template Q Sum(Q x,Q y) {return (x)+(y);} 则下列语句中对该函数模板错误的使用是()
①  Sum(10,2);
②  Sum(0,7);
③  Sum(2f,0f);
④  Sum(“AB”,”CD”);
【单选题】 下列语句中,将函数int sum(int x, int y)正确重载的是( )。
①  float sum(int x, int y);
②  int sum(int a, int b);
③  float sum(float x, float y);
④  double sum(int y, int x);
【单选题】 下列语句中,将函数int sum(int x, int y)正确重载的是( )。
①  float sum(int x, int y);
②  int sum(int a, int b);
③  float sum(float x, float y);
④  double sum(int y, int x);
【单选题】 公式=SUM(C2:C6)的作用是( A )。
①  求C2到C6这五个单元格数据之和
②  求C2和C6这两个单元格数据之和
③  求C2和C6这两个单元格的比值
④  以上说法都不对
【单选题】 在Excel中,公式SUM(C2:C6)的作用是()。
①  求C2到C6这五个单元格数据之和
②  求C2和C6这两个单元格数据之和
③  求C2与C6单元格的比值
④  以上说法都不对
【单选题】 在JavaScript中,运行下面的代码,sum的值是( )。 var sum = 0; for(i = 1; i < 10; i++) { if(i%5==0) break; sum = sum + i; }
①  40
②  50
③  5
④  10
【单选题】 若以下变量均是整型,且num=sum=7,则执行表达式sum=num++,sum++,++num后sum的值为( )。
①  7
②  8
③  9
④  10
【单选题】 函数模板定义如下: templateMax( T a, T b ,T c){c=a+b;}下列选项正确的是( )
①  int x, y; char z; Max(x, y, z);
②  double x, y, z; Max( x, y, z);
③  int x, y; float z; Max( x, y, z);
④  float x; double y, z; Max( x,y, z);
随机题目
【单选题】 These two areas are similar __________ they both have a high rainfall during this season.
①  to that
②  besides that
③  in that
④  except that
【单选题】 Success results ___________ hard work, and hard work results in success.
①  from
②  in
③  by
④  with
【单选题】 David, there a dictionary and some books on your desk. Please put them away.
①  is
②  are
③  have
④  has
【单选题】 _________ is no reason for dismissing him.
①  Because he was a few minutes late
②  Owing to a few minutes being late
③  The fact that he was a few minutes late
④  Being a few minutes late
【单选题】 Police are __________ the disappearance of two children.
①  looking out
②  looking after
③  looking into
④  looking on
【单选题】 He his success to good luck.
①  adds
②  owes
③  apologizes
④  limits
【单选题】 This article deals with the natural phenomenon which __________ most interesting to everyone.
①  are
②  is
③  they are
④  it is
【单选题】 This is a very difficult operation. It is essential that you __________ for emergency.
①  are to be prepared
②  would prepared
③  be prepared
④  must be prepared
【单选题】 I __________ going to the doctor, but I wish I hadn’t.
①  pick out
②  make out
③  give off
④  put off
【单选题】 I can be a teacher. I’m not a very patient person.
①  seldom
②  ever
③  never
④  always