- 在32位机器上,4位一寻址,一个指针占4个字节;
- 在64位机器上,8位一寻址,一个指针占8个字节;
所以,对于
typedef struct node
{
char name[10];
struct node *link;
}stud;
32位:sizeof(stud) = 16
64位:sizeof(stud) = 24
![](https://img-my.csdn.net/uploads/201207/02/1341204369_6943.png)