#include <stdio.h>
struct atype{
    int key;
};
void main(){
    struct atype a[3][4]={27,43,87,32,
                          12,51,21,89,
                          80,40,44,99}, (*p)[4], *q;  //*p는 한 행(4칸)짜리 포인터
    p=a;
    q=a[0];  //q =a[0] = 첫번째 행의 첫 번째 원소 = 27
    p++;     //p++ = p는 4칸 짜리 포인터니까 다음 행 = 12,51,21,89 가리킴
    q++;     //q++ = q는 구조체 하나를 가리킴 = 27,43,87,32 중에 27 다음 43 가리킴
    printf("%d", (*p)->key + q->key);
    // (*p)->key = 12,51,21,89 중에 12를 가리킴
    // q->key = 43
    //12+43=55    55 출력!
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: