12. 若运行以下程序时,从键盘输入3.6,2.4<CR>,(<CR>表示回车),则下面程序的运行结果是( ) #include <math.h> # include <stdio.h> main() {float x,y,z; scanf("%f,%f",&x,&y); z=x/y; while(1) {if...
2. 有如下函数模板定义:template <class T> T f(T x,T y) {return x*x+y*y;} 在下列对f的调用中,错误的是() A. f(3,5) B. f(3.0,5.5) C. f<int>(3,5.5) D. f(3,5.5) ...
13. 重载“>>”时,为保证其连用性,重载函数的返回类型应为() A. istream B. ostream C. istream & D. ostream & ...
3. 有类模板定义如下:template <class Type> class Dream { }下列类对象的定义中,正确的是() A. Dream a B. Dream<class int> a C. Dream<int> a D. Dream<class Type> a ...
10. 下面程序的输出是( ) main() { int a=-1,b=4,k; k=(a++<=0)&&(!(b--<=0)); printf("%d%d%d\n",k,a,b);} A. 0 0 3 B. 0 1 2 C. 1 0 3 D. 1 1 2 ...
11. 若有定义:int x=0,*p=&x;则语句printf(“%d\n”,*p);的输出结果是( ) A. 随机值 B. 0 C. X的地址 D. P的地址 ...
3. 有定义:int x,*p=&x;,则能为变量x正确赋值的语句是( ) A. scanf(“%d”,x); B. scanf(“%d”,p) C. scanf(“%d”,*p); D. scanf(“%f”,&x); ...
6. 以下for循环的执行次数是( ) for(x=0,y=0; (y=123)&&(x<4);x++); A. 是无限循环 B. 循环次数不定 C. 执行4次 D. 执行3次 ...
16. "Got your plans for the weekend, Bill?" "Well, I had planned to go to London, but I _____ afford the train fare." A. can B. can't C. may D. might ...
21. "The windows need washing." "Well, let's wash them together, ________ ? A. shall we B. will we C. won't we D. should we ...