You can also refer at cprogramming.com
] for a brief reference on fopen() stdio.h function in C,and its modes.
r - open for reading
w - open for writing (file need not exist)
a - open for appending (file need not exist)
r+ - open for reading and writing, start at beginning
w+ - open for reading and writing (overwrite file)
a+ - open for reading and writing (append if file exists)
To open a file in a binary mode you must add a b to the end of the mode string; for example, "rb" (for the reading and writing modes, you can add the b either after the plus sign - "r+b" - or before - "rb+")».
The link also happens to include brief references to fclose(),but also to fprintf(),fscanf(),fputc(),fgetc() for flow(or serial,I am not sure for this english term)files and to fread() and fwrite() for binary files.