Dynamic array Abstract Data Type (ADT) in C