Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.86 KB | None | 0 0
  1. void printNameWithArray(contact* contactArray, int size)
  2. {
  3.     int i = 0;
  4.     for(; i < size; i++)
  5.     {
  6.  
  7.         printf("\nID: %d\n", contactArray[i].ID);
  8.         printf("Name: %s\n", contactArray[i].name);
  9.         printf("Surname: %s\n", contactArray[i].surname);
  10.         printf("City: %s\n", contactArray[i].address->city);
  11.         printf("Street: %s\n", contactArray[i].address->street);
  12.         printf("House number: %d\n", contactArray[i].address->houseNumber);
  13.         printf("Zip code: %s\n", contactArray[i].address->zipCode);
  14.         printf("Post office: %s\n", contactArray[i].address->postOffice);
  15.         int itterator =1;
  16.         phone_t *temp = contactArray[i].phoneHead;
  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