What do you mean with "dynamic size"? That you can enlarge the array? That can't work, as there could always be used memory right behind your array.

If you want something like a list with unlimited size, you can use linked lists.