第三题:下列4个选项中,哪个结果为6?int a[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, *p = a;(A) *p + 6; (B) *(p+6); (C) *p += 5; (D) p+5;

第三题:下列4个选项中,哪个结果为6?

int a[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, *p = a;

(A) *p + 6; (B) *(p+6); (C) *p += 5; (D) p+5;


相关考题:

有以下程序struct S {int n; int a[20];};void f(struct S *P){ int i,j,t;for(i=0;ip-n-1;i++)for(j=i+1;jp-n;j++)if(p-a[i]p-a[j]) { t=p-a[i]; p-a[i]=p-a[j]; p-a[j]=t; }}main( ){ int i; struct S s={10,{2,3,1,6,8,7,5,4,10,9}};f(s);for(i=0;is.n;i++) printf("%d",s.a[i]);}程序运行后的输出结果是A)1,2,3,4,5,6,7,8,9,10,B)10,9,8,7,6,5,4,3,2,1,C)2,3,1,6,8,7,5,4,10,9,D)10,9,8,7,6,1,2,3,4,5,

有以下程序struct S {int n; int a[20];}; void f(struct S *P) {int i,j,t; for(i=0;in-1;i++) for(j=i+1;jn;j++) if(p-a[i]p-a[j]) { t=p-a[i]; p-a[i]=p-a[j]; p-a[j]=t; } } main() {int i; struct S s={10,{2,3,1,6,8,7,5,4,10,9}}; f(s); for(i=0;i printf(“%d”,s.a[i]); } 程序运行后的输出结果是( )。 A.1,2,3,4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.2,3,1,6,8,7,5,4,10,9,D.10,9,8,7,6,1,2,3,4,5,

若有以下说明: int a[10]={1,2,3,4,5,6,7,8,9,10},,*p=a;则值为6的表达式是( )。A.*p+6 B.*(p+6) C.*p+=5 D.p+5

下列程序的输出结果是( )。 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

有以下程序includemain(){int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL; *q 有以下程序 #include<stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL; *q= *(p+5); printf("%d %d\n",*p,*q); } 程序运行后的输出结果是A.运行后报错B.6 6C.6 11D.5 10

有以下程序 struct S{ int n;int a[20];}; voidf(struct S*p) { int i,j,t; for(i=0;i<p->n-1;i++) for(j=i+1;j<p->n;j++) if(p->a[i]>p->a[j]){t=p->a[i];p->a[i]=p->a[j];p->a[j]=t;} } main() { int i;struct S s={10,{2,3,l,6,8,7,5,4,10,9}}; f(s); for(i=0;i<s.n;i++)printf("%d,",s.a[i]); } 程序运行后的输出结果是A.1,2,3,4,5,6,7,8,9,10,B.10,9,8,7,6,5,4,3,2,1,C.2,3,1,6,8,7,5,4,10,9,D.10,9,8,7,6,1,2,3,4,5,

有以下程序:includemain(){int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL;*q 有以下程序: #include <stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL; *q=*(p+5); printf("%d %d \n",*p,*q); } 程序运行后的输出结果是( )。A.运行后报错B.66C.611D.510

下面程序的输出结果是()。includemain(){int a[]={1,2,3,4,5,6,7,8,7,10},*p;p=a;print 下面程序的输出结果是( )。 #include<stdio.h> main() {int a[]={1,2,3,4,5,6,7,8,7,10},*p; p=a; printf("%d\n",*p+8); }A.0B.1C.10D.9

若有以下说明: int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a; 则值为6的表达式是_______。A.*p+6B.*(p+6)C.*p+=5D.p+5

以下程序的运行结果是_______。 #include "stdio.h" main() { int a[]={1,2,3,4,5,6,7,8,9,10,11,12}; int *p=a+5,*q=NULL; *q=*(p+5); printf("%d %d\n",*p,*q); }A.运行后报错B.6 6C.6 12D.5 5

以下程序的输出结果是 ______。define NULL 0includevoid main(){ int a[]={1,2,3, 以下程序的输出结果是 ______。 #define NULL 0 #include<iostream.h> void main(){ int a[]={1,2,3,4,5,6,7,8,9,10}; int *p=a+5,*q=NULL; *q=*(p+5); cout<<*p<<’ ’<*q; }A.运行后报错B.6 6C.6 11D.5 5

下面程序的输出结果是includemain(){int a[]={1,2,3,4,5,6,7,8,9,0},*p;p=a;printf("% 下面程序的输出结果是 #include<stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; p=a; printf("%d\n",*p+9);}A.0B.1C.10D.9

有以下程序main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; for(p=a;pa+10;p++) printf("%d,",*p);}程序运行后的输出结果是A.1,2,3,4,5,6,7,8,9,0, B.2,3,4,5,6,7,8,9,10,1, C.0,1,2,3,4,5,6,7,8,9, D.1,1,1,1,1,1,1,1,1,1,

以下程序的输出结果是includeint a[3][3]={1,2,3,4,5,6,7,8,9,},*p;main(){p=(int*)ma 以下程序的输出结果是 #include<stdio.h> int a[3][3]={1,2,3,4,5,6,7,8,9,},*p; main() { p=(int*)malloc(sizeof(int)); f(p,a); printf("%d\n",*p); free(p);} f(int *s, int p[][3]) { *s=p[1][1];}A.1B.4C.7D.5

有以下程序: main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; for(p=a;p<a+10,p++)printf("%d,",*p); } 程序运行后的输出结果是 ______。A.1,2,3,4,5,6,7,8,9,0,B.2,3,4,5,6,7,8,9,10,1,C.0,1,2,3,4,5,6,7,8,9,D.1,1,1,1,1,1,1,1,1,1,

第二题:下列哪个引用是不正确的?int a[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, *p = a;(A) a[p-a]; (B) *(a); (c) p; (D) *(*(a+i));

有以下程序:include main( ){int a[ ] = { 1,2,3,4,5,6,7,8,9,0} , * p;for(p =a;p 有以下程序:#include <stdio. h>main( ){ int a[ ] = { 1,2,3,4,5,6,7,8,9,0} , * p; for(p =a;p<a+10;p++) printf("%d," , *p); }程序运行后的输出结果是( )。A.1,2,3,4,5,6,7,8,9,0,B.2,3,4,5,6,7,8,9,10,1,C.0,1,2,3,4,5,6,7,8,9,D.1,1,1,1,1,1,1,1,1,1,

有以下程序:includeusingnamespacestd;int main (){ int a[]={1,2,3, 4,5, 6, 7,8,9, 有以下程序: #include<iostream> using namespace std; int main () { int a[]={1,2,3, 4,5, 6, 7,8,9, 10, 11, 12}; int *p=a+5, *q=0; *q=* (p+5); cout<<*p<<" "<<*q<<end1; return 0; }A.运行后报错B.66C.6 12D.5 5

以下程序的运行结果是______。 include main() {int a[]:{1,2,3,4,5,6,7,8,9,10,11,12 以下程序的运行结果是______。 #include <stdio.h> main() {int a[]:{1,2,3,4,5,6,7,8,9,10,11,12): int *p=a+5,*q=NULL: *q=*(p+5): printf("%d %d\n",*p,*q); }A.运行后报错B.66C.612D.5 5

以下程序的运行结果是()。includemain(){int a[]={1,2,3,4,5,6,7,8,9,10,11,12}; int * 以下程序的运行结果是( )。 #include <stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,10,11,12}; int *p=a+5,*q=NULL; *q=8(p+5); printf("%d %d\n", *p,*q); }A.运行后报错B.6 6C.6 11D.5 5

有以下程序includemain(){inta[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL; *q= 有以下程序 # include <stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL; *q=*(p+5); printf("%d %d \n",*p,*q); } 程序运行后的输出结果是A.运行后报错B.6 6C.6 11D.5 10

下面程序的输出结果是______。 main() {int a[10]={0,1,2,3,4,5,6,7,8,9},*p=a+4; printf("%d\n",p[3]); }A.6B.7C.3D.5

若有以下说明:int [10]={1,2,3.4,5,6,7,8,9,10},*p= a;则数值为6的表达式是()A、p+6B、*(p+6)C、p+=5D、p+5

若有int a[10]={0,1,2,3,4,5,6,7,8,9},*p=a;则输出结果不为5 的语句为()。A、printf("%d",*p[5]);B、printf("%d",p[5]);C、printf("%d",*(p+5));D、printf("%d",*(a+5));

单选题有以下程序#include struct S{ int n; int a[20];};void f(struct S *p){ int i,j,t; for(i=0;in-1;i++)  for(j=i+1;jn;j++)   if(p-a[i]p-a[j])   {    t=p-a[i];    p-a[i]=p-a[j];    p-a[j]=t;   }}main(){ int i; struct S s = {10,{2,3,1,6,8,7,5,4,10,9}}; f(s); for(i=0;iA1,2,3,4,5,6,7,8,9,10,B10,9,8,7,6,5,4,3,2,1,C2,3,1,6,8,7,5,4,10,9,D10,9,8,7,6,1,2,3,4,5,

单选题若有以下说明:int [10]={1,2,3.4,5,6,7,8,9,10},*p= a;则数值为6的表达式是()Ap+6B*(p+6)Cp+=5Dp+5

单选题若有int a[10]={0,1,2,3,4,5,6,7,8,9},*p=a;则输出结果不为5 的语句为()。Aprintf(%d,*p[5]);Bprintf(%d,p[5]);Cprintf(%d,*(p+5));Dprintf(%d,*(a+5));