i tried it...n something seems to be written in the customer.txt file...
it looks something like this
"H( ž@ 8@ ~x( K@  PR R p( *v @ R ~ˆ( ˜@  ”( w6\v ~( r w ~ž32w ~ *( wš ( E w€@ ~ €@ ~ "
wats the problem here...
here is the code:
FILE *ofp;
for (i=0;i<5;i++)
{
printf("%d \n",acc[i].account_number);
printf("%s \n",&acc[i].account_type);
printf("%d \n",acc[i].balance);
}
ofp = fopen("customer.txt", "w");
fwrite(&acc[i], sizeof acc[i], 5, ofp);
fclose(ofp);