how to print it to a file
i have created a simple dumb err what ever you want to call it... but anyways i did this for practice structures but i want to know how can i make the info print to a file... im using linux btw..
Code:
struct data{
char fname[25];
char lname[25];
char fnumb[10];
}ph;
int main()
{
printf("\nType in the first and last one of the person\n");
printf("please add a space when typing the last name\n\n");
scanf("%s %s",&ph.fname, &ph.lname);
printf("\n Please type in the persons phone number\n");
scanf("%s",&ph.fnumb);
printf("Name: %s %s\n",ph.fname, ph.lname);
printf("Phone#: %s\n",ph.fnumb);
return 0;
}
thanx