maybe correct way to declare dynamically sized array in c?