mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
18 lines
253 B
C
18 lines
253 B
C
#include <stdio.h>
|
|
|
|
static char buffer[] = "foobar";
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
int ch;
|
|
FILE *stream;
|
|
|
|
stream = fmemopen (buffer, strlen (buffer), "r");
|
|
while ((ch = fgetc (stream)) != EOF)
|
|
printf ("Got %c\n", ch);
|
|
fclose (stream);
|
|
|
|
return 0;
|
|
}
|