Prog#174: read a bio-data & write it in file

/*
read a bio-data & write it in file
Program#174
*/
#include<stdio.h>
main()
{
typedef struct bio{
char name [25];
int age;
float salary;
char addr [35];
}BIO;
BIO a;
FILE *fp;
fp=fopen ("BIODATA", "W");
if(fp==NULL)
{
printf("file open error");
return 0;
}
scanf("%s %d %f %s", &a.name, &a.age, &a.salary, &a.addr);
fprintf(fp, "%s %d %f %s", a.name, a.age, a.salary, a.addr);
fclose(fp);
return 0;
}