Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. void printNameWithArray(contact* contactArray, int size)
  2. {
  3. int i = 0;
  4. phone_t *temp = contactArray[i].phoneHead;
  5. for(; i < size; i++)
  6. {
  7.  
  8. printf("\nID: %d\n", contactArray[i].ID);
  9. printf("Name: %s\n", contactArray[i].name);
  10. printf("Surname: %s\n", contactArray[i].surname);
  11. printf("City: %s\n", contactArray[i].address->city);
  12. printf("Street: %s\n", contactArray[i].address->street);
  13. printf("House number: %d\n", contactArray[i].address->houseNumber);
  14. printf("Zip code: %s\n", contactArray[i].address->zipCode);
  15. printf("Post office: %s\n", contactArray[i].address->postOffice);
  16. int itterator =1;
  17. while(temp != NULL)
  18. {
  19. printf("%d) %d\n", itterator, temp->phoneNumber);
  20. itterator++;
  21. temp = temp->next;
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement