1. [单选题]说明数组后,数组元素的初值是( )。
A. 整数0
B. 值
C. 逻辑真
D. 逻辑假
2. [单选题]以下程序段中的变量已正确定义。 for(i=0;i
以下程序段中的变量已正确定义。 for(i=0;i
A. *
B. ****
C. **
D. ********
3. [单选题]下列特征中不是面向对象方法的主要特征的是( )。
A. 多态性
B. 继承
C. 封装性
D. 模块化
4. [单选题]下列说法正确的是()。
A. 线程的终止一般可通过两种方法来实现,自然撤销(线程执行完)或是被停止(调用stop()方法)
B. 一个暂时终止运行的线程(例如,睡眠或阻塞)在排除了终止原因后直接运行
C. 一个线程因为输入输出操作被阻塞时,执行resume()方法可以使其恢复就绪状态
D. 调用了suspend()方法,也可以使线程进入死亡状态
5. [多选题]要将文本框中的字体设为“宋体”,可设置()的属性为“宋体”。
A. FontBold
B. BackItalic
C. FontName
D. FontSize
6. [单选题]要使一个标签透明且不具有边框,则应______ 。
A. 将其BackStyle. 属性设置为0,BorderStyle. 属性设置为0
B. 将其BackStyle属性设置为0,BorderStyle属性设置为1
C. 将其BackStyle属性设置为1,BorderStyle属性设置为0
D. 将其BackStyle属性设置为1,BorderStyle属性设置为1
7. [单选题]有以下程序段: int m=0,n=0; char c='a'; scanf("%d%c%d",&m,&c,&n); printf("%d,%c,%d\n",m,c,n); 若从键盘上输入10A10回车>,则输出结果是( )。
A. 10,A,10
B. 10,a,10
C. 10,a,0
D. 10,A,0
8. [单选题]Mid("Hello Everyone",7,3)的执行结果是
A. yon
B. every
C. Eve
D. one
9. [单选题]执行语句序列 ofstream outfile("data.dat"); if(…)cout"ok";else cout"fail"; 后,如果文件打开成功,显示“ok”,否则显示“fail”。由此可知,上面if语句的“…” 处的表达式是
A. outfile.fail()或outfile
B. outfile.good()或!outfile
C. outfile.good()或outfile
D. outfile.fail()或!outfile
10. [单选题]有如下程序:includeusing namespace std;class XX{protected:int k;public:XX(int n=
有如下程序: #includeiostream> using namespace std; class XX { protected: int k; public: XX(int n=5):k(n){}; ~XX() { cout"XX": } virtual void f()const=0; }; inline void XX::f()const { coutk+3; }; class YY:public XX { public: ~YY() { cout”YY”; } void f()const { coutk-3; XX::f(); } }; int main() { XX &p=*new YY; P.f(); delete &p; return 0: } 执行上面的程序将输出( )。
A. 28XX
B. 28YYXX
C. 33XX
D. 33XXYY