[Solved] C expandable array [closed]


ArrayList’s in Java are complex data structures based on object oriented programming, while arrays in C programming language are simply indexed chains of allocated memory of certain lengths.

The only way to access an element in C programming language array is to give it’s index, which is used to compute the address of variable in this array you wish to access.

example:

If character[11] is an array of char, each char variable takes 1 byte, you wish to access 5th element of array characters, the address of this element will be compute like that: 5*1+(address of the first element).

If you wish to use more complex data structures in C programming language you will have to implement it. Here is a good place to start:

Arraylist in C not working

0

solved C expandable array [closed]