#include <stdio.h>
#include <string.h>
int main(void)
{
FILE *fp;
char s[15] = "C Programming";
fp = fopen("d:\\data.bin","wb");
if (!fp) {fputs("File open error",stderr); return 1;}
fwrite(s, sizeof(char), strlen(s), fp);
fclose(fp);
return 0;
}
/*
run: (the content of d:\\date.bin)
C Programming
*/