#include <stdio.h>
#define N 4
int main(void)
{
int num_arr[N] = { 10, 20, 30, 100 };
FILE *fp = fopen("d:\\data.bin", "wb");
if (fp == NULL)
{
perror ("Error open file");
return 1;
}
fwrite(num_arr, sizeof(int) * N, 1, fp);
fclose(fp);
return 0;
}
// file content: d
/*
run:
*/