blob: a59f27e350ec23b2054f7f315900223fe285cf6e [file] [log] [blame] [edit]
#include <stdio.h>
#include <string.h>
int main() {
FILE *handle = fopen("test", "wb");
fputs("hello from file!", handle);
fclose(handle);
handle = fopen("test", "r");
char str[256] = {};
fgets(str, 255, handle);
printf("%s\n", str);
return strcmp(str, "hello from file!");
}