#include #include struct person{ char *name[10]; char *surname[10]; int id; int age; struct person *nextPtr; }; int main(){ int i, n; printf("Enter ammount of personel: "); scanf("%d",&n); struct person *headPtr=(struct person*)malloc(sizeof(struct person)*n); struct person *tempPtr=headPtr; FILE *data= fopen("data.txt","w"); fclose(data); for(i=0;iname); printf("Enter %d. personal surname: ", i+1); scanf("%s",&tempPtr->surname); printf("Enter %d. personal age: ", i+1); scanf("%d",&tempPtr->age); printf("Enter %d. personal ID: ", i+1); scanf("%d",&tempPtr->id); data= fopen("data.txt","a"); fprintf(data,"\n[User %d]\n",i+1); fprintf(data,"Name: %s\n",*tempPtr->name); fprintf(data,"Surname: %s\n",*tempPtr->surname); fprintf(data,"Age: %d\n",tempPtr->age); fprintf(data,"Name: %d\n",tempPtr->id); fclose(data); *tempPtr=*tempPtr->nextPtr; } }