关于理论知识隔壁们的教程说的很详细了我就不多赘述了。我这边主要贴一段代码来看看这两种东西使用上的区别到底在哪。
#include <stdio.h> int main(int argc, char ** argv) { int a1[2] = {1,2}; int a2[2] = {3,4}; int b[2][2] = {5,6,7,8}; int *p[2] = {a1,a2}; int (*q)[2] = b; printf("%d",**p); printf("%d",*(*p+1)); printf("%d",**(p+1)); printf("%d",**(p+1)+1); printf("\n"); printf("%d",*q[0]); printf("%d",*(q[0]+1)); printf("%d",*q[1]); printf("%d",*(q[1]+1)); }
Out:
1234
5678
转载于:https://www.cnblogs.com/AkazaAkari/p/7700602.html