mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
initial import
This commit is contained in:
17
manual/examples/memopen.c
Normal file
17
manual/examples/memopen.c
Normal file
@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user