沉默过客

文章
5
资源
0
加入时间
4年0月6天

c:结构体指针加减法

gcc 编译器会根据指针类型对绝对地址做右移操作,返回就是实际的元素个数。[root@vmtca-2003 test]# cat struct.c#include <stdio.h>#include <string.h>typedef struct test{ int a; int b;} TEST; (sizeof 8)int main(){ TEST a[10]; TEST *