write: fprintf
read: fgets, sscanf or fgets + ad-hoc or XML, or ...
see scs cclass §17.1 for more information