i have this create_new function that seems to be right to me but i dont know how to test it. How would i call the function?
Code:
personal create_new()
{
personal temp;
printf("\nFist Name: ");
fgets(temp.F_name, sizeof temp.F_name, stdin);
printf("\nLast Name: ");
fgets(temp.L_name, sizeof temp.L_name, stdin);
printf("\nSalary: ");
scanf("%d", &temp.salary);
printf("\nMonth of birth: ");
scanf("%d", &temp.birth.Birth_month);
printf("\nDay of Birth: ");
scanf("%d", &temp.birth.Birth_day);
printf("\nYear of Birth: ");
scanf("%d", &temp.birth.Birth_year);
printf("\nAddress information...");
printf("\nStreet name: ");
fgets(temp.stuff.street, sizeof temp.stuff.street, stdin);
printf("\nCity: ");
fgets(temp.stuff.city, sizeof temp.stuff.city, stdin);
printf("\nState: ");
fgets(temp.stuff.state, sizeof temp.stuff.state, stdin);
printf("\nZip Code: ");
fgets(temp.stuff.zip, sizeof temp.stuff.zip, stdin);
return (temp);
}