[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C input
- To: Leonid Leibman <http://www.raqia.com/~leonidl>
- Subject: Re: C input
- From: http://dummy.us.eu.org/robert (robert)
- Date: Thu, 23 Aug 2001 15:36:52 -0400
- In-Reply-To: <3B8549EC.380A6E8E@raqia.com>
- Keywords: http://www.raqia.com/~leonidl
> From: Leonid Leibman <http://www.raqia.com/~leonidl>
> Date: Thu, 23 Aug 2001 14:22:36 -0400
>
> ---Executing: html-to-ascii
> Hi, Robert -- do you know how to do the following: I have a file with
> arbitrary ascii symbols (like EOF in particular), I want to read them
> into the memory. Seems like fgets for example cares about EOF or
> maybe something else? gets according to man pages does care about EOF
> etc....--
>
> Leonid Leibman
>
#include <stdio.h>
int main()
{
char buffer[65536];
int c;
char* p;
p=buffer;
while ((c=getchar())!=EOF)
*p++=c;
return 0;
}