A、The、/、a
B、A、a、/
C、The、the、a
D、A、the、/
第1题:
A、MID(“yesterday”,1,3)
B、LEFT(“yesterday”,3)
C、MIDB(“yesterday”,1,6)
D、RIGHT(MID(“yesterday”,1,3),3)
第2题:
根据下列程序的执行结果,可以断定划线部分的修饰符应为______。执行结果:
i9a football is created.
a football is created.
i=10
a football is destroyed.
a football is created.
i=20
a football is destroyed.
a football is destroyed.
源程序:
include<iostream.h>
class Football
{
public:
Football( ){cout<<"a football is created."<<endl;}
~Football( ){tout<<"a football is destroyed."<<endl;}
};
void func(int i)
{
______Football f1;
Football f2;
cout<<"i="<<i<<endl;
}
void main( )
{
func(10);
func(20);
}
第3题:
下面的定义语句中,使数组str不能正确保存字符串的是()。
A.char str[6]="China";
B.char str[ ]="China";
C.char str[5]={'C','h','i','n','a'};
D.char str[6]={"China"};
第4题:
A、Holding...being held
B、Held...holding
C、Having held...held
D、Held⋯ be held
第5题:
有下列声明语句 char s[6][10]={"China's", "first", "football", "textbooks", "for","schools"}; char *p[5],(*q)[10],*r; 下列哪个赋值语句是不正确的?
A.p=s ;
B.q=s ;
C.r=&s[0][0] ;
D.p[0]=s[0];
第6题:
以下字符串赋值的表达式中,不能正确赋值的是()。
A.char s[ ] = "china";
B.char s[10]; s = "china";
C.char *s = "china" ;
D.char s[10] = {'c','h','i','n','a','0'};