Prog#205: read a bio-data from keyboard & store it into a file

/*
read a bio-data from keyboard & store it into a file
Program#205
*/
#include<stdio.h>
main(int argc,char *argv[])
{
union xyz{
struct bio{
char name [25];
int age;
float salary;
char addr [25];
}a;
char b[sizeof(struct bio)];
};
union xyz m;
FILE *fp;
int i;
if(argc!=2)
{
printf("error. no.of arg");
return 0;
}
fp=fopen (argv[i], "w");
if(fp==NULL)
{
printf("file open error");
return 0;
}
scanf("%s %d %f %s", &m.a.name, &m.a.age, &m.a.salary, &m.a.addr);
for(i=0;i<sizeof(struct bio);i++)
putc(m.b[i],fp);
fclose(fp);
}