0
Unable to create output file
2 Answers
0
What have you tried? And it probably won't work in the Solo playground.
0
size_t fwrite(const void *restrict ptr, size_t size, size_t nitems,
FILE *restrict stream);
Here is the signature to write to a file.
#include<stdio.h>
int main () {
FILE *fp;
char str[] = "Write this to file.";
fp = fopen( "file.txt" , "w" );
fwrite(str , 1 , sizeof(str) , fp );
fclose(fp);
return(0);
}
This is the basic open file and write to it example.