帮帮忙,找了半天不知道错哪了,要求用指针变量输出二维数组中任意一个元素的值
#include <stdio.h>
int main()
{int a[3][4]={ {0,1,2,3},{10,11,12,13},{20,21,22,23} };
int *p,i,j;
p=a;
printf("\ninput i and j:\n");
scanf("%d %d",&i,&j);
printf("a[%d][%d]=%d\n",i,j,*(p+(i-1)*4+(j-1)));
return 0;
}