Prog#180: writing into a file using command line argument

/*
writing into a file using command line argument
Program#180
*/
#include<stdio.h>
main(int argc, char* argv[])
{
typedef struct bio{
char name [20];
int age;
float salary;
char addr [25];
}BIO;
BIO a;
FILE *fp;
fp=fopen (argv[1], "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);
}