A file represents a sequence of bytes, does not matter if it is a text file or binary file. 
C programming language provides access on high level functions as well as low level (OS level) calls to handle file on your storage devices. 
Depending upon the way file is opened for processing, a file is classified into text and binary file.
If a large amount of numerical data it to be stored, text mode will be insufficient. In such case binary file is used
Functions allow a program to be split into a set of sub problems which, in turn, may be further split into smaller sub problems. This divide-and-conquer approach means that small parts of the program can be written, tested, and debugged in isolation without interfering with other parts of the program.
Functions can wrap-up difficult algorithms in a simple and intuitive interface, hiding the implementation details, and enabling a higher-level view of the algorithm’s purpose and use.
Functions avoid code duplication. If a particular segment of code is required in several places, a function provides a tidy means for writing the code only once. This is of considerable benefit if the code segment is later altered.