Line-by-Line Input
fgets( data, size, fp ) # read next line from fp (up to size)
gets( data ) # read next line from stdin
fgets() is preferable to gets()
Returns address of data array (or NULL if EOF or other error occurred)
Example:
#define MAX_LENGTH 256
char inputData[MAX_LENGTH];
FILE *fp;
fp = fopen( argv[1], “r” );
fgets( inputData, MAX_LENGTH, fp );