Category Archives: GNU C Library

How to differentiate between EOF and a character whose ASCII code is 255

Posted in kerneltrap.org on June 1, 2008 – 10:05pm A call to fgetc() or getchar() will return EOF if the end-of-file has been reached. As far as I know, GNU C Library defines EOF to be (-1). Those who are … Continue reading

Posted in C, GNU C Library, Programming Languages | Tagged , , | 2 Comments

Printing size_t or ssize_t variable

Posted in kerneltrap.org on May 18, 2008 – 10:28pm Looking at the man page of printf (man 3 printf), in the length modifier section, it is written: z       A following integer conversion corresponds to a size_t or ssize_t argument. (Linux libc5 … Continue reading

Posted in C, GNU C Library, Programming Languages | Tagged , | Leave a comment