>> while ((fgets( line, BUFSIZE, file )!=EOF))//why shoudn't I use EOF is there something better?
You really should learn to read the documentation about the functions that you use. If you had, you would have found out that fgets() returns a char pointer or NULL when end-of-file is reached. Don't just toss functions at a program without knowning what they do. you can google for most fiunctions, such as "man fgets" will return the man page for that function.