结构体变量占内存的大小由什么决定?

日期:2018-04-24 13:12:51 人气:1

结构体变量占内存的大小由什么决定?

举个例子说明 struct data { int day,month,year; }; struct stu { char name[2]; long num; struct data birthday; }; 这里影响占内存的大小的因素首先是有两个成员(name),其次是每个成员的内容,包括long型的num和birthday,并且birthday又是一个嵌入的结构体。
    A+
热门评论