#include #include struct product { uint8_t record_id; unsigned int product_id; char name[10]; unsigned int amount; }; struct customer { uint8_t record_id; unsigned int customer_id; char name[20]; char address[30]; double balance; }; struct product p1 = {1,456,"Shoe",6}; struct product p2 = {1,891,"Lace",9}; struct product p3 = {1,1983,"Wheel",116}; struct customer c1 = {2,98,"Donald Duck","1313 Webfoot Walk",-345.12}; struct customer c2 = {2,100,"Huey Duck","1313 Webfoot Walk",0.0}; struct customer c3 = {2,34,"Daisy Duck","899 Webfoot Walk",23.12}; struct customer c4 = {2,201,"Scrooge McDuck","1212 Killmotor Hill",-900.0}; main(int c,char **a) { FILE *fp = fopen("bin_data","w"); fwrite(&p1,sizeof(p1),1,fp); fwrite(&c1,sizeof(c1),1,fp); fwrite(&c2,sizeof(c2),1,fp); fwrite(&p2,sizeof(p2),1,fp); fwrite(&c3,sizeof(c3),1,fp); fwrite(&p3,sizeof(p3),1,fp); fwrite(&c4,sizeof(c4),1,fp); }