Help more people learn by sharing this post!

Tag Archives for " dynamic arrays "

Dynamic Arrays in C – part 1

While working on my C programming skills I wrote a small program to simulate the functionality of dynamic arrays on other languages. That is arrays that grow as you add elements to them instead of having a fixed size. I decided that is has to be reusable and that you should be able to have multiple instances of them, so I structured my code with that in mind.

So this is the file structure:

  • main.c – initialize the array and fill it for testing purposes
  • array.h – function declarations
  • array.c – function definitons

Continue reading