Sign in
nest-open-source
/
nest-cam
/
v350
/
glibc
/
refs/heads/main
/
.
/
manual
/
examples
/
memopen.c
blob: 682830fe5f8a4dfc965a00254619c4566828932a [
file
] [
log
] [
blame
]
#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
;
}