static void test1()
{
struct node {
int a;
char b;
char c;
int d;
int e;
};
struct node s = { 3, 4, 5, 6 };
//struct node s = { .a = 3, .c = 4, .e = 5, .d = 6 };
struct node *p = &s;
printf("%d\n", *((int*)p + 3));
printf("%d\n", ((int*)p + 4)[-1]);
}
|
|