I have a list of records, at the starting I dont know the number of records. I need to read them into array.
so is it advisable to read all record one by one & doing reallo
The optimal strategy for this sort of thing depends on the specifics of what you're doing, but one common, simple, and nearly optimal approach is to increase your allocation size by a factor of two whenever you run out of room in your array.