I am writing a small program which contains an array of structures, when the program is run it will save the data from the array of structures onto disk in a binary file, this bin file will also be available for reading by the user. I know all this uses the fwrite and the fread functions, but I am having problems getting to grips with this. Could someone please give me a small example. Here is my array of structures:
Code:#include<stdio.h> struct data{ char product[25]; int amount; float cal; }; struct data plan[500]; int main() { /*code....*/ }