Flexible Array Member
A flexible array member is an unsized array declared as the last member of a struct to support contiguous variable-length payload allocation.
sizeofreturns the size of the struct excluding the Flexible Array Member. Hence the need to addsize * sizeof(type)in dynamic allocation.- The Flexible Array has to be the last member of the struct.
- The Flexible Array can't be the only member of the struct.
