fgets c

C
<open file>
while(fgets(<char array>, <size of array>, <file pointer>) != null)
Source

Also in C: