设有定义:int X[10],+P=x,i;,若要为数组x读人数据,以下选项正确的是( )。
第1题:
设有定义:“double x[10],*p=x;”,以下能给数组x下标为6的元素读人数据的正确语句是( )。
A.scanf("%f"&x[6]);
B.scanf("%If",*(x+6));
C.scanf("%if",p+6);
D.scanf("%if",p[6]);
第2题:
下列选项对数组x[100]和指针变量p的定义,正确的语句是()
A.float x[100]; float *p=x;
B.float x[100]; int *p=x;
C.float x[100]; int *p=&x;
D.float x[100]; float *p=&x;
第3题:
设有定义:double x[100],*p=x;,以下能给数组x下标为6的元素读入数据的正确语句是
A.scanf("%lf",&x[5]);
B.scanf("%lf",*(x+6));
C.scanf("%lf",p+6);
D.scanf("%lf",p[6]);
第4题:
(24)设有定义:double x[10],*p=x;,以下能给数组x下标为6的元素读入数据的正确语句是
A)scanf("%f",&x[6]);
B)scanf("%lf",*(x+6));
C)scanf("%lf",p+6);
D)scanf("%lf",p[6]);
第5题:
若已定义x为int类型变量,下列语句中说明指针变量p的正确语句是()。
A.int p=&x;
B.int *p=x;
C.int *p=&x;
D.*p=*x;