输入行和列打印对应的值
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
int i;int j;
int a[3][4] = { 0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11 };
int(*p)[4];
p = a;
printf("输入行列");
scanf("%d%d", &i, &j);
printf("%d", *(*(p + i-1) + (j-1)));
while (1);
return 0;
}
#笔经#
#include <stdio.h>
int main()
{
int i;int j;
int a[3][4] = { 0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11 };
int(*p)[4];
p = a;
printf("输入行列");
scanf("%d%d", &i, &j);
printf("%d", *(*(p + i-1) + (j-1)));
while (1);
return 0;
}
#笔经#