网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
若有程序段 int b[4],*p,*q; p=&b[1]; q=&b[3]; 则q-p表示的意义是()。
A.表达式错误
B.p与q之间数据个数
C.p占据的字节数
D.p与q之间的字节数
参考答案和解析
p 与q之间数据个数
更多 “若有程序段 int b[4],*p,*q; p=b[1]; q=b[3]; 则q-p表示的意义是()。A.表达式错误B.p与q之间数据个数C.p占据的字节数D.p与q之间的字节数” 相关考题
考题
(27)有以下程序#include stdio.hvoid f(int *p,int *q );main(){ int m=1,n=2,*r=m;f(r,n);printf(“%d,%d”,m,n);}void f(int *p,int *q){p=p+1;*q=*q+1;}程序运行后输出的结果是A)1,3 B)2,3 C)1,4 D)1,2
考题
下列程序的输出结果是( )。 void f(int*x,int*y) {int t; t=*x,*x=*y;*y=t; } main() {int a[8]={1,2,3,4,5,6,7,8},i,*p,*q; p=a;q=a[7]; while(p<q) {f(p,q);p++;q--;} for(i=0;i<8;i+)printf("%d,",a[i]); }A.8,2,3,4,5,6,7,1B.5,6,7,8,1,2,3,4C.1,2,3,4,5,6,7,8D.8,7,6,5,4,3,2,1
考题
若有定义语句:"int a[4][10],*P,*q[4];"且0≤i
若有定义语句:"int a[4][10],*P,*q[4];"且0≤iA.D=aB.q[i]=a[i]C.p=a[l]D.P=&a[2][1]
考题
下述程序的输出结果是()。includevoid main(){int a[5]={1,2,3,4,5};int *p=a,**q=p
下述程序的输出结果是( )。 #include<stdio.h> void main() {int a[5]={1,2,3,4,5}; int *p=a,**q=&p; printf("%d,",*(p++)); printf("%d",**q);}A.2,2B.1,1C.3,4D.1,2
考题
若有以下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l
若有以下程序段:include <iostream>using namespace std;int main(){char*p="abcdefgh",*r;long*q;q=(long*)p;q++;r=(char*)q;cout<<r<<end1;return 0;}该程序的输出结果是【 】。
考题
若有一些定义和语句 include int a=4,b=3,*p,*q,*w; p=a; q=b; w=q; q
若有一些定义和语句 #include <stdio.h> int a=4,b=3,*p,*q,*w; p=a; q=b; w=q; q=NULL; 则以下选项中错误的语句是A.*q=0;B.w=p;C.*p=va;D.*p=*w;
考题
若有如下程序:include using namespace std;int main(){ char *p="abcdefgh",*r; lon
若有如下程序: #include <iostream> using namespace std; int main() { char *p="abcdefgh",*r; long *q; q=(long *)p; q++; r=(char *)q; cout<<r<<end1; return 0; } 上述程序的输出结果是( )。A.abcdefghB.0C.abcdD.efgh
考题
若有以下定义和语句:includeinta=4,b=3,*p,*q,*w;p=a; q=b; w=q; q=NULL;则
若有以下定义和语句: #include<stdio.h> int a=4,b=3,*p,*q,*w; p=a; q=b; w=q; q=NULL; 则以下选项中错误的语句是( )。A.*q=0;B.w=p;C.*p=a;D.*p=*w;
考题
若有以下定义和语句includeint a=4,b=3,*p,*q,*w;p=a;q=b;w=q;q=NULL;则以
若有以下定义和语句 #include<stdio.h> int a=4,b=3,*p,*q,*w; p=a;q=b;w=q;q=NULL; 则以下选项中错误的语句是A.*q=0;B.w=p;C.*p=a;D.*p=*w;
考题
若有如下程序段: include using namespace std; int main() {char*p="abcdefgh",*r;l
若有如下程序段:include <iostream>using namespace std;int main(){char *p="abcdefgh",*r;long *q;q=(long *)p;q++;r=(char *)q;cout<<r<<end1;return 0;}该程序的输出结果是______。
考题
有以下程序 void f(int *x,int *y) { int t; t=*X; *X=*y; *y=t; } main() { int a[8]={1,2,3,4,5,6,7,8},i,*p,*q; p=a; q=a[7); while(p>q) { f(p,q); p++; q--; } for(i=0; i<8; i++) printf("%d,",a[i]); } 程序运行后的输出结果是A.8,2,3,4,5,6,7,1,B.5,6,7,8,1,2,3,4,C.1,2,3,4,5,6,7,8,D.8,7,6,5,4,3,2,1,
考题
有以下程序: void f(int*x,int*y) { int t; t=*x;*x=*y;*y=t; } main() { int a [8]={1, 2,3,4,5, 6, 7,8},i,*p,*q; p=a;q=a[7]; while(p<q) {f(p,q);p++;q-;} for(i=0;i<8;i++)printf("%d,"a[i]); } 程序运行后的输出结果是 ______。A.823,4,5,6,7,1,B.5,6,7,8,12,3,4,C.1,2,3,4,5,6,7,8,D.8,7,6,5,4,3,2,1,
考题
若有以下定义和语句 int a=4.b=3.* p, * q, * w; p=a;q= b; w=q;q=NULL; 则以下选项中错误的语句是A.*q=0;B.w=p;C.*p=a;D.*p=* w;
考题
假设关系P和Q具有相同的关系模式,以下所列出的等价式中,______是错误的等价式。A.P∩Q=P-(P-Q)B.P∩Q=Q-(Q-P)C.P∪Q=P∪(Q-P)D.P∪Q=Q∪(Q-P)A.B.C.D.
考题
若有以下定义和语句 int a=4,b=3,*p, *q, *w; p=a; q=b; w=q; q=NULL; 则以下选项中错误的语句是A.*q=0B.w=pC.*p=a;D.*p=*w;
考题
若有int a[3][4]={1,2,3,4,5,6,7,8,9,10,11,12};int(*q)[3]=a,*p a[0];则能够正确表示数组元素 a[1][2]的表达式是 ______。A.*((*q+1)[2])B.*(*(p+5))C.(*q+1)+2D.*(*(a+1)+2)
考题
下列程序的输出结果是 ______。includevoid main(){ int a[]={1,2,3,4,5,6},*p,**q;
下列程序的输出结果是 ______。 #include <iostream.h> void main() { int a[]={1,2,3,4,5,6},*p,**q; p=a; q=p; cout<<*(p++); cout<<**q<<end1; }A.34B.56C.12D.23
考题
填空题以下程序段的输出结果是()。 int a=l,b=2,*p=&a,*q=&b; p=q;*p=3; printf(“%d”,b);
热门标签
最新试卷