A person can contain a birth date, while that birth date contains both a calendar date and a time precision. In C, this arrangement uses a structure member whose type is another structure type. section 6.3
struct stardate {
struct tm date;
struct timespec precision;
};
struct person {
char name[256];
struct stardate bdate;
};
!@%STYLE%@!
{"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":6}],[{\"line\":1,\"ch\":2},{\"line\":1,\"ch\":8}],[{\"line\":2,\"ch\":2},{\"line\":2,\"ch\":8}],[{\"line\":4,\"ch\":0},{\"line\":4,\"ch\":6}],[{\"line\":6,\"ch\":2},{\"line\":6,\"ch\":8}],[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":6}],[{\"line\":1,\"ch\":2},{\"line\":1,\"ch\":8}],[{\"line\":2,\"ch\":2},{\"line\":2,\"ch\":8}],[{\"line\":4,\"ch\":0},{\"line\":4,\"ch\":6}],[{\"line\":6,\"ch\":2},{\"line\":6,\"ch\":8}],[{\"line\":1,\"ch\":9},{\"line\":1,\"ch\":11}],[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":6}],[{\"line\":1,\"ch\":2},{\"line\":1,\"ch\":8}],[{\"line\":2,\"ch\":2},{\"line\":2,\"ch\":8}],[{\"line\":4,\"ch\":0},{\"line\":4,\"ch\":6}],[{\"line\":6,\"ch\":2},{\"line\":6,\"ch\":8}],[{\"line\":2,\"ch\":9},{\"line\":2,\"ch\":17}],[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":6}],[{\"line\":1,\"ch\":2},{\"line\":1,\"ch\":8}],[{\"line\":2,\"ch\":2},{\"line\":2,\"ch\":8}],[{\"line\":4,\"ch\":0},{\"line\":4,\"ch\":6}],[{\"line\":6,\"ch\":2},{\"line\":6,\"ch\":8}],[{\"line\":5,\"ch\":2},{\"line\":5,\"ch\":6}],[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":6}],[{\"line\":1,\"ch\":2},{\"line\":1,\"ch\":8}],[{\"line\":2,\"ch\":2},{\"line\":2,\"ch\":8}],[{\"line\":4,\"ch\":0},{\"line\":4,\"ch\":6}],[{\"line\":6,\"ch\":2},{\"line\":6,\"ch\":8}]]"}
!@%STYLE%@!
This listing separates the inner stardate declaration from the person declaration, making the nesting visible through the bdate member. section 6.3
C permits any member type other than a variable-length array, so structures may contain other structures. A nested declaration may also be written inside the outer structure declaration, but that placement does not create a new struct scope. section 6.3
TAKEAWAY 6.28: All struct declarations in a nested declaration have the same visibility scope. At file level they remain visible throughout the file; inside a function, visibility is limited to the enclosing block. section 6.3






