In fall, I like to play the wind.[ ]
A. on
B. at
C. in
答案:C
使用VC++6.0打开考生文件夹下的源程序文件1.cpp,该程序运行时有错,请改正其中的错误,使程序正常运行,并使程序输出的结果为 TC1 TC2 注意:不要改动main函数,不能增加或删除行,也不能更改程序的结构,错误的语句在//******error******的下面。 试题程序: #include<iostream.h> #include<assert.h> struct TC0 //********error******** virtual void fun(); ; class TC1:public TC0 void fun() cout<<"TC1"<<end1; ; class TC2:public TC0 void fun() cout<<"TC2"<<end1; ; void main() TC0 *p; TCl obj1; TC2 obj2; //********error******** p=*obj1; p—>fun(); //********error******** p=*obj2; p—>fun(); return;
下列程序的运行结果是( )。 #include<stdio.h> main () int x=5, a=1, b=2, c=5, d=O ; if (a<b) if (b!=3) if (!c) x=1; else if(d)x=1; else x=-1; printf("%d",x);
A.-1
B.0
C.1
D.不确定的值