File I/O

A binary file is computer-readable but not human-readable.

text to text

text to binary

binary to binary

binary to text

(Function)

fopen

fgets

fgets(line, 6, fpi);

Text file I/O

fscanf

while(fscanf(fpi,”%d %f %f %f %s”,&id,&x,&y,&z,nan)!=EOF)

fprintf

Binary file I/O

fread

fwrite

fwrite(&dn,sizeof(float),1,fpo);

malloc

argc – main is declared with arguments