<P> The sizeof operator on such a struct gives the size of the structure as if the flexible array member had been omitted except that it may have more trailing padding than the omission would imply . As such it is preferable to use offsetof when determining size for dynamic allocation, as in the following example: </P> <P> When allocating such structures on the heap, it is generally required to reserve some space for the flexible array member, as in the following example: </P> <P> When using structures with a flexible array member, some convention regarding the actual size of that member should be defined . In the example above, the convention is that the member arr has len double - precision numbers . </P> <P> In previous standards of the C language, it was common to declare a zero - sized array member instead of a flexible array member . The GCC compiler explicitly accepts zero - sized arrays for such purposes . </P>

C flexible array member not at end of struct