Sparse Array in C! How accomplish it? Can I alloc only parts of an array?

Posted by drigoSkalWalker on Stack Overflow See other posts from Stack Overflow or by drigoSkalWalker
Published on 2010-03-18T19:01:53Z Indexed on 2010/03/18 19:11 UTC
Read the original article Hit count: 226

Filed under:
|

Hi guys!

The first question is: "How I do a simple sparse array in C (with one dimension only)?" {with my own hands, without libraries.}

And the last one: "Can I allocate only parts of an array?"

like *array;

then use malloc to allocate some mem for this; so, We free the index that we don't want.

Can I do it?

Thanks so much!

© Stack Overflow or respective owner

Related posts about c

    Related posts about array