Ok so I have a couple of files within a C program diffrent files for diffrent things etc.
What I want to know is, Can I open all the files at the beginning of the program (in main) and close it when the program exits
or
Should I write the fopen at the beginning of the used functions and close them at the end of the functions?