fgets(line, sizeof(line), stdin); code example Example: fgets c <open file> while(fgets(<char array>, <size of array>, <file pointer>) != null)