Get the latest tech news
Static arrays are the best vectors
What if I told you that C has a built-in vector?
Once you try to run the executable, however, the operating system will check that you currently have enough RAM available to hold the entire array in memory, assuming it may grow to its maximum size. This is why I recommend setting the maximum number of entries to a strategic value that will almost certainly never be reached, while still being low enough that even with 1 GB of leftover RAM the program is allowed to boot. It also can’t be understated how useful it is that C guarantees that all global and static variables are initialized to 0, as you can use it to fill your settings struct with default values of 0,'\0', NULL, and false(since they’re all just the number 0).
Or read this on Hacker News