Variable Length Structure

Learn how to store varying length structures in memory.

We'll cover the following


Suppose your program has the following requirements:

  • The structure has three fixed-size elements, one of varying size
  • All elements are to be stored in adjacent memory locations

Example program

See the code given below!

Get hands-on with 1200+ tech skills courses.