user3661025
user3661025

Reputation: 58

What does fgets return when EOF is found?

does it return anything? is EOF nothing but -1 ? How does fgets detect an EOF ? Can somebody please elaborate also on the difference between gets and fgets()

Upvotes: 2

Views: 111

Answers (1)

sumanth232
sumanth232

Reputation: 587

It returns NULL on encountering EOF

Upvotes: 1

Related Questions