编辑代码


#include <stdio.h>
int main () {
    short *yyy;
    char *zzz;
    static struct a{
        int a;
        short b;
        char c[14];
    }kouzou,*point;
    struct a table[10];

    point = (struct a *)malloc(sizeof(struct a)*3);

    point -> a=10;
    point -> b=5;
    strcpy((char *)&point->c,"abcdefghijklm");

    table[0].a=3;
    table[0].b=7;
    strcpy((char *)&table[0].c,"0123456789012");

    yyy=(short*)table;
    printf("%d\n",*yyy);
    yyy++;
    printf("%d\n",*yyy);
    yyy++;
    printf("%d\n",*yyy);

    printf("\n");
    zzz=(char *)point;
    
    // for(int i=0;i<20;i++){
    //     printf("%d\n",*zzz);
    //     zzz++;
    // }
    zzz++;
    printf("%d\n",*zzz);
    zzz+=2;
    printf("%d\n",*zzz);
    zzz+=16;
    printf("%d\n",*zzz);
}