Hi luismaya,
I'm not sure I am understanding what your question is. Do you want to write to the file as well?
This line is where you declare the file name you want to give it and what file you are reading. "/tmp/datafile" is the path to the file.
datafile= fopen( "/tmp/datafile" , "r");
Regards,
Intel_Jesus