On 26/02/2019 19:42, Sérgio Basto wrote:

Is stdio.h that defines EOF as -1 , so if we what work with files and
use EOF character,  we need use signed chars, though .

No, you need to use int. The EOF value is deliberately outside the
range of character values so that EOF is not a valid character!

If you look at the stdio functions that can return EOF you will
find that they all use int not char...

Tom

--
Tom Hughes ([email protected])
http://compton.nu/
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to