0 is the estimated mean value of Y when the value of X is ().
A: 0
B: 1
C: -1
A: 0
B: 1
C: -1
举一反三
- In the following options, the value of expression ( ) is 0, when x is both an odd number and greater than 1. A: x%2==1 B: x/2 C: x%2!=0 D: x%2==0
- 下面类的索引定义或使用正确的是()。 A: class MyClass{ int x; int y; public int this[int index] { get{ if (index==0) return x; else return y; }}} B: class MyClass{ int x; int y; public int this[int index] { set{ if (index==0) x=value; else y=value; }}} C: class MyClass{ int x; int y; public int INDEX[int index] { get{ if (index==0) return x; else return y; } set{ if (index==0) x=value; else y=value; }}} D: class MyClass{ int x; int y; public int this[int index] { get{ if (index==0) return x; else return y; } set{ if (index==0) x=value; else y=value; }}}
- 下列语句与y=(x>;0?1:x<;0?-1:0);语句功能相同是( ) A: if (x) if(x>;0) y=1; else if(x<;0) y=-1;else y=0; B: y=-1; if(x>;0) y=1; else y=-1; C: if (x>;0) y=1; else if(x<;0) y=-1; else y=0; D: y=0; if(x>;=0) y=1;else if(x==0) y=0; else y=-1;
- 以下程序的运行结果是()。 #include intfact(intvalue); intmain() {printf('FACT(5):%d ',fact(5)); printf('FACT(1):%d ',fact(1)); fact(–5); return(0); } intfact(intvalue) {if(value<0){printf('FACT(–1):Error! ');return(–1);} elseif(value==1||value==0)return(1); elsereturn(value*fact(value–l)); }
- 表示下列分段函数的正确的C语言语句是?[img=130x65]1803bce86a99b5b.png[/img] A: if (x < 0) y = -1; else if (x > 0) y = 1; else y = 0; B: if (x < 0) y = -1; if (x = 0) y = 0; if (x > 0) y = 1; C: if (x < 0) y = -1; if (x == 0) y = 0; if (x > 0) y = 1; D: if (x <= 0) if (x < 0) y = -1; else y = 0; else y = 1;