Problem: Read data from file of unknown size, store in memory for processing nums.dat lotsauNums.dat +----+ +----+ | 9 | | 9 | | 86 | | 86 | | 63 | | 63 | | 47 | ... in here there could be 5 million more numbers!!! | 81 | | 47 | +----+ | 81 | +----+ For the final exam, know these three options: (1) Static arrays: size determined at compile time size is FIXED. space allocated on stack advantage: easy disadvantage: wasteful of space (2) Dynamic arrays size determined at run time space allocated on heap advantage: easy disadvantage: must know size in advance (2b) One way around "needing to know size in advance" is to first read through the file in its entirety, but don't store anything... just count how many numbers there are. then, allocate an array big enough. Disadvantage: Doubles the time required to read all the data. (3) Linked Lists size determined on the fly... space is on the heap grow or shrink on demand... disadvantage: detailed also: overhead of 32-bits per value stored... "next pointers"