网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

委托类型DG1的定义为delegate float DG1(int a,ref double b);那么下列委托对象的创建表达式中合法的有:()。

  • A、DG  1dg1=delegate {return  0.3;};
  • B、DG  1dg2=delegate {return  a;};
  • C、DG  1dg3=delegate (int  a,ref  double  b) {return  a;};
  • D、DG  1dg4=delegate (int  a,ref  double  b) {return  a/b;};

参考答案

更多 “委托类型DG1的定义为delegate float DG1(int a,ref double b);那么下列委托对象的创建表达式中合法的有:()。A、DG 1dg1=delegate {return 0.3;};B、DG 1dg2=delegate {return a;};C、DG 1dg3=delegate (int a,ref double b) {return a;};D、DG 1dg4=delegate (int a,ref double b) {return a/b;};” 相关考题
考题 有以下程序int fun1(double a){return a*=a;}int fun2(double x,double y){ double a=0,b=0;a=fun1(x);b=fun1(y);return(int)(a+b);}main(){ double w; w=fun2(1.1,2.0); …… }程序执行后变量 w 中的值是A)5.21B)5C)5.0D)0.0

考题 以下程序的输出结果是______。 include int add(int x, int y) { return x+y; } doub 以下程序的输出结果是______。include<iostream.h>int add(int x, int y){return x+y;}double add(double x, double y){return x+y;}void main(){int a=3, b=3;double c=6.5, d=1.5;cout<<add(a, b)<<","<<add(c, d)<<end1;}

考题 已知:double A(double A){return++a;}和int A(int a){return ++a;)是一个函数模板的两个实例,则该函数模板定义为【 】。

考题 ( 14 )下面的函数定义是某函数模板能够生成的函数实例int square(int n) {return n*n;}double square(double n) {return n*n;}由此可知,该函数模板的定义是 【 15 】 。

考题 若主调用函数类型为double,被调用函数定义中没有进行函数类型说明,而return语句中的表达式类型为float型,则被调函数返回值的类型是()。A.int型B.float型C.double型D.由系统当时的情况而定

考题 您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?() A.public delegate int PowerDeviceOn(bool, DateTime);B.public delegate bool PowerDeviceOn(Object, EventArgs);C.public delegate void PowerDeviceOn(DateTime);D.public delegate bool PowerDeviceOn(DateTime);

考题 分析以下程序执行结果【】。 include int f (int x, int y){return x,y; } double f (d 分析以下程序执行结果【 】。include<iostream.h>int f (int x, int y){return x,y;}double f (double x, double y) {return x,y;}void main() {int a=4, b=6;double c=2.6, d=7.4;cout<<f (a, b) <<","<<f (c, d) <<end1;}

考题 有下列程序: int funl(double a){return a*=a;} int fun2(double x,double y) {double a=0,b=0; a=funl(x);b=funl(y);return(int)(a+b); } main( ) {double w;w=fun2(1.1,2.0),……} 程序执行后变量w中的值是( )。 、A.5.21B.5C.5.0D.0.0

考题 下列程序运行后的输出结果是( )。#includeusing namespace std;int fun(int x) { return x*x; }double fun(double x,int y=2) { return x*y; }int main(){int a=5;double b= 1.2;cout}A. 27.4B.26.44C. 12.4D.程序有误

考题 已知:double A(double A) {return++a;}和int A(in A) {return++a;}是一个函数模板的两个实例,则该函数模板定义为【 】

考题 下列程序的输出结果是【】include using namespace std; int main() { int num=500; int 下列程序的输出结果是【 】include<iostream>using namespace std;int main(){int num=500;int ref=num;ref +=100;cout<<num<<end1;return 0;}

考题 有以下程序:int fun1 (double a){ return a * =a;}int fun2 ( double x, double y ){ double a=0,b=0; a = fun1 (x) ;b = fun1 (y); return(int) (a + b);} main() { doublew;w=fun2(1.1,2.0);……} 程序执行后变量w中的值是( )。A.5.21B.5C.5D.0

考题 在下列方法的定义中,正确的是 ( )A.public double x(){..;return false;}B.public static int x(double y){...}C.void x(doubled){...;return d}D.public static x(double a){..}

考题 有以下程序; int f1(double A) { return a*a; } int f2(double x,double y) { double a, b; a=n(x); b=f1(y); return a+b; } main() { double w; w=f2(1.1,2.0); ┇ } 变量w中的值是( )A.5.21B.5C.5D.0

考题 有下列程序: int funl(double a){return a*=a;) int fun2(double x,double y) { double a=0,b=0; a=funl(x);b=funl(y);return(int)(a+h); } main {double w;w=fun2(1.1,2.0),……) 程序执行后变量w中的值是( )。A.5.21B.5C.5.0D.0.0

考题 下列方法定义中,正确的是( )。A.int x(int a,b)B.double x(int a,int b) {return(a-b);){int w:w=a-b:}C.double x(a,b)D.int x (int a,int b) {return b}{return a-b;}

考题 声明一个委托类型public delegate int myCallBack(int x); 则以下语句可以和委托myCallBack绑定的方法是()A、 void myCallBack(int x)B、 int receive(int num)C、 string receive(int x)D、 不确定的

考题 You need to write a multicast delegate that accepts a DateTime argument.Which code segment should you use?()A、public delegate int PowerDeviceOn(bool result,DateTime autoPowerOff);B、public delegate bool PowerDeviceOn(object sender,EventArgs autoPowerOff);C、public delegate void PowerDeviceOn(DateTime autoPowerOff);D、public delegate bool PowerDeviceOn(DateTime autoPowerOff);

考题 You work as an application developer at Certkiller .com. You have been given the responsibility of creating a class named CalcSalary that will determine the salaries of Certkiller .com’s staff. The CalcSalary class includes methods to increment and decrement staff salaries. The following code is included in the CalcSalary class: public class CalcSalary { // for promotions public static bool IncrementSalary (Employee Emp, double Amount) { if (Emp.Status == QuarterlyReview.AboveGoals) Emp.Salary += Amount; return true; } else return false; } //for demotions public static bool DecrementSalary (Employee Emp, double Amount) { if (Emp.Status == QuarterlyReview.AboveGoals) Emp.Salary -= Amount; return true; } else return false; } } You would like to invoke the IncrementSalary and DecrementSalary methods dynamically at runtime from the sales manager application, and decide to create a delegate named SalaryDelegate to invoke them. You need to ensure that you use the appropriate code to declare the SalaryDelegate delegate.What is the correct line of code?()A、 public delegate bool Salary (Employee Emp, double Amount);B、 public bool Salary (Employee Emp, double Amount);C、 public event bool Salary (Employee Emp, double Amount);D、 public delegate void Salary (Employee Emp, double Amount);

考题 您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()A、public delegate int PowerDeviceOn(bool, DateTime);B、public delegate bool PowerDeviceOn(Object, EventArgs);C、public delegate void PowerDeviceOn(DateTime);D、public delegate bool PowerDeviceOn(DateTime);

考题 您已创建一个名为 CalcSalary,将确定 Certkiller.com 员工的薪酬类的责任。CalcSalary 类包括员工的薪酬递增和递减的方法。下面的代码包含在 CalcSalary 类中:()public class CalcSalary {// for promotionspublic static bool IncrementSalary (Employee Emp, double Amount){if (Emp.Status == QuarterlyReview.AboveGoals)Emp.Salary += Amount;return true;A、public delegate bool Salary (Employee Emp, double Amount);B、public bool Salary (Employee Emp, double Amount);C、public event bool Salary (Employee Emp, double Amount);D、public delegate void Salary (Employee Emp, double Amount);

考题 单选题您已创建一个名为 CalcSalary,将确定 Certkiller.com 员工的薪酬类的责任。CalcSalary 类包括员工的薪酬递增和递减的方法。下面的代码包含在 CalcSalary 类中:()public class CalcSalary {// for promotionspublic static bool IncrementSalary (Employee Emp, double Amount){if (Emp.Status == QuarterlyReview.AboveGoals)Emp.Salary += Amount;return true;A public delegate bool Salary (Employee Emp, double Amount);B public bool Salary (Employee Emp, double Amount);C public event bool Salary (Employee Emp, double Amount);D public delegate void Salary (Employee Emp, double Amount);

考题 单选题您需要写一个接收日期参数的多播委托,您应该使用哪一个代码片段() //委托就是一个方法,题目没有返回值。A public delegate int PowerDeviceOn(bool result, DateTime autoPowerOff);B public delegate bool PowerDeviceOn(object sender, EventArgs autoPowerOff);C public delegate void PowerDeviceOn(DateTime autoPowerOff);D public delegate bool PowerDeviceOn(DateTime autoPowerOff);

考题 单选题You need to write a multicast delegate that accepts a DateTime argument.Which code segment should you use?()A public delegate int PowerDeviceOn(bool result,DateTime autoPowerOff);B public delegate bool PowerDeviceOn(object sender,EventArgs autoPowerOff);C public delegate void PowerDeviceOn(DateTime autoPowerOff);D public delegate bool PowerDeviceOn(DateTime autoPowerOff);

考题 单选题有以下程序 int fun1(double a) { return a*=a; } int fun2(double x,double y) { double a=0,b=0; a=fun1(x); b=fun1(y); return(int)(a+b); } main() { double w; w=fun2(1.1,2.0); } 程序执行后变量w中的值是()A 5.21B 5C 5.0D 0.0

考题 单选题委托类型DG1的定义为delegate float DG1(int a,ref double b);那么下列委托对象的创建表达式中合法的有:()。A DG 1dg1=delegate {return 0.3;};B DG 1dg2=delegate {return a;};C DG 1dg3=delegate (int a,ref double b) {return a;};D DG 1dg4=delegate (int a,ref double b) {return a/b;};

考题 单选题您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()A public delegate int PowerDeviceOn(bool, DateTime);B public delegate bool PowerDeviceOn(Object, EventArgs);C public delegate void PowerDeviceOn(DateTime);D public delegate bool PowerDeviceOn(DateTime);