输出对角线的数值

 

eg:

 

#include <stdio.h>
main()
{   int a[3][3]={0,1,2,3,4,5,6,7,8},(*p)[3],i;
    p=a;
    for(i=0;i<3;i++)
    {  printf("%d ",(*p)[i]); p++; }
}

posted @ 2020-07-09 19:11  attendere  阅读(201)  评论(0编辑  收藏  举报