Good luck on the final man.
I'm pretty sure I'm in your class. ...
I would do the linked lists a bit different.
I would use global pointers
NODE *ptr1, *ptr2, ...etc
The use of pointers is so that you can keep track of what the previous node is.
So say you created a new node. How would you know the address of the previous node so that you can link the two together?
So you created one node, let's say hypothetically at address 1.
Then you create another one at address 100.
Since you don't hardcode the addresses down, the point is that the *next in the first node should point to the second node, address 100. You would not be able to assign the address to the first node if you don't know where the first node is.
Here it is pictorally:
step 1: created node
newnode (points to) node 1
assigned next to Null
step 2: create another node
newnode (now points to) node 2
assigned next to NULL
// How do we get node 1 -> next to point to node 2?
we have to do this:
step 0: create pointer
step 1: created node
newnode (points to) node 1
assigned next to Null
pointer points to newnode
step 2: create another node
newnode (now points to) node 2
assigned next to NULL
pointer still points to first node, so you can assign
pointer->next = newnode
Finally, your approach to the problem is sort of... whacky
All your code seems to be in one section, instead of sectioned into functions, which would make it conceptually easier.
just check what you really want to do. You should open the file OUTSIDE of the make new node function, as well as close it outside. The way you have it, everytime you make a new node, you open and close the file.
If you leave the file open, everytime it runs fscanf it will move to the next line, so you don't really have to do any filepointer moving.
As for your malloc... you need to typecast the malloc since malloc always gives a void pointer. So what you need is newnode = (NODE *)malloc(sizeof(NODE));
and you should check if it returned NULL as well.
The next step in your program should be to make a loop so that the make new node runs until it reaches the end of the file.
You should come up with specific problems to ask since a general "help me" is kind of hard.
Good luck.
PS
and you are writing to stdout, which is the monitor, so you are not writing to file. You have to write to the filepointer if you want to write to the file, eg fprintf(fp, "blahblah%d", day);