单选题
C语言
题号 #2546342
若有以下的说明和语句,则在执行for语句后,*(*(pt+1)+2)表示的数组元素是( )。
im t[3][3],*pt[3],k;for(k=0;k<3;k++)pt[k]-&t[k][o];
参考答案
C
答案解析
C。【解析】从for循环可知,pt是指向行的首地址的指针变量,因此由指针的表示方法可知:*(*(pt+1)+2)一pt[1][2]=t[l][2]。
你可能感兴趣的试题
A.21,43
B.43,21
C.43,00
D.21,00
A.#include<stdi0.h>
void swap(int。P,int+q)
( int*t,a;
t=&a;*t=*P;*p=*q;*q=*t;
)
main()
{ int a=10,b=20;
swap(&a,&b);printf(”%d%dkn”,a,b);
)
void swap(int。P,int+q)
( int*t,a;
t=&a;*t=*P;*p=*q;*q=*t;
)
main()
{ int a=10,b=20;
swap(&a,&b);printf(”%d%dkn”,a,b);
)
B.#include<stdio.h>
void swap(int*p,int*q)
{ int t;
t=*P;*P=*q;*q=t;
}
main()
{ int a-10,b-20;
swap(&a,&b);printf(”%d%d\n”,a,b);
)
void swap(int*p,int*q)
{ int t;
t=*P;*P=*q;*q=t;
}
main()
{ int a-10,b-20;
swap(&a,&b);printf(”%d%d\n”,a,b);
)
C.#included stdi*.h>
void swap(int*P,int*q)
{ int t;
t=*P;*P=*q;*q=t;
)
main()
{ int*a,*b;
*a=10,*b=20:
swap(a,b);printf(”%d%d\n”,*a,*b);
)
void swap(int*P,int*q)
{ int t;
t=*P;*P=*q;*q=t;
)
main()
{ int*a,*b;
*a=10,*b=20:
swap(a,b);printf(”%d%d\n”,*a,*b);
)
D.#include<stdio.h>
void swap(int*P,int*q)
( int t;
t=*P;*P=*q;*q=t;
)
main()
{ int a=10'b=20,*x=&a,*y=&b;
swap(x,y);print{(”%d%d\n”,a,b);
)
void swap(int*P,int*q)
( int t;
t=*P;*P=*q;*q=t;
)
main()
{ int a=10'b=20,*x=&a,*y=&b;
swap(x,y);print{(”%d%d\n”,a,b);
)