C 99 provide programmer a way to save a memory space.
struct DM {
int x,
char* z[]
}
z just a label, compilar won’t allocate a memory for that, and this declaration only could put in last of structure declaration. therefore if we need to allocate a space for this structure when we need to store a data in variable z, otherwise we will assign wrong address which is next to variable x.
Reference
[1] C in a nutshell
No comments:
Post a Comment