(1)
main()
{
static int a[3][4]={1,2,3,4,5,6,7,8,9,10,12};
int *arr[3]={a[0],a[1],a[2]};
int i,**p;
p=arr;
printf("p=%d,*p=%d,**p=%d\n",p,*p,**p);
}
(2)
main()
{
int a[3][4]={1,2,3,4,5,6,7,8,9,10,12};
int *arr[3]={a[0],a[1],a[2]};
int i,**p;
p=arr;
printf("p=%d,*p=%d,**p=%d\n",p,*p,**p);
}
为什么第一个函数运行正确的,而第二个函数却是错误的呢?在这里static起到什么作用呢?还望高手们详细解说static的用法。拜托,谢谢!!!!!!!!!!!