/* File: fwrite1.c Practicing with fwrite() */ #include main() { int A[10] ; int i, r ; FILE *ofile ; for (i = 0 ; i < 10 ; i++) { A[i] = 7 * i ; } ofile = fopen("binary", "wb") ; r = fwrite(A, sizeof(int), 10, ofile) ; printf("%d items were written to the output file\n", r) ; fclose(ofile) ; }