Without thinking about it too much it would seem like there are three options:

1) Create arrays big enough to hold all the data.

Drawback: Wasted memory space if text file contains small amount of data compared to array size created.

2) Allocate memory as you go along. I'm sure you could ask for more resources to enlarge your array by one INT entry every new row that is encountered using MALLOC or one of its close cousins.

3) Use a linked list type structure where each node holds an integer value and just enlarge as you go along. There are libraries that already provide this if you don't want to write your own, such as Vector.