The whole point of linked lists is that you've no idea in advance how many you need.
So they're allocated on demand (ie, INSIDE your loop), and chained together (aka LINKED).

The ->next pointer of the old node points to the new node, and so on as more node are added.