#include<stdio.h>
int main () {
FILE *fp;
char str[] = "This is tutorialspoint.com";
fp = fopen( "file.txt" , "w" );
fwrite(str , 1 , sizeof(str) , fp );
fclose(fp);
return(0);
}
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
fwrite (buffer /*ptr*/, 1 /*size [byteweise]*/, sizeof(buffer) /*nmemb*/, dstfile /*stream*/);