0 of 6 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 6 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
2、若定义:
int a=511, *b=&a;
cout<<*b;
输出结果为:
3. 若有定义:
int a[]={2,4,6,8,10,12},*p=a;
则:
*(p+1)的值是 ;
*(a+5)的值是 ;
4、有以下程序,执行后的输出结果是( )
main(){
int x[8]={8,7,6,5,4,3,2,1},*s;
s=x+3;
cout<<s[2]);
}
5、有以下程序,执行后的输出结果是( )
void fun(int *a,int i,int j)
{ int t;
if(i<j) {
t=a[i];
a[i]=a[j];
a[j]=t;
fun(a,++i,--j);
}
}
main(){
int a[]={1,2,3,4,5,6},i;
fun(a,0,5);
for(i=0;i<6;i++) cout<<a[i]<<' ';);
}
6、阅读以下程序:
main(){
char a[]=“Language”,b[]=“Programe”;
char *p1,*p2; int k;
p1=a;p2=b;
for(k=0;k<8;k++)
if(*(p1+k)==*(p2+k))
cout<<*(p1+k);
return 0;
}
运行后的输出结果是