Date: Mon, 23 Apr 2001 17:08:29 +0000 From: David <david@angra.uac.pt> To: questions@freeBSD.org Subject: fgets/fputs Message-ID: <0104231717100C.05409@david>
next in thread | raw e-mail | index | archive | help
I have a doubt on libc: Both fputs and fgets functions use a char* instead of char[255] fgets (char *s, int count, FILE *stream) fputs (const char *s, FILE *stream) but the program only works when I define char[255] instead of char* as I show in the source code below:...Why? int main() { char str[255]; int i; i=255; fgets (str, i, stdin) ; fputs (str,stdout) ; exit (1); } ------------------------------------------------------------ David Sousa Mendes LAMTec- Laboratório de Ambiente Marinho e Tecnologias Telefone : 96.4470312 Residência : R. da Graça, nº 90 9760 - Praia da Vitória Ilha Terceira To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0104231717100C.05409>