Question: I need help with the following questions please Structures and arrays file 1. Download structinstruct3.c that we analyzed in class into your own labo3 directory.

I need help with the following questions please

I need help with the following questions please Structures and arrays file

Structures and arrays file

1. Download structinstruct3.c that we analyzed in class into your own labo3

directory. Rename the file lab03structs.c. 2. Open emacs by opening the terminal

1. Download structinstruct3.c that we analyzed in class into your own labo3 directory. Rename the file lab03structs.c. 2. Open emacs by opening the terminal and typing emacs24 3 Open lab03structs.c in emacs and look over the code. 4. Add a float member to struct address_tag called latitude - make it the first entity in the structure. 5. Add a float member to struct address_tag called longitude - make it the second entity in the structure 6. Update the code in main so that these 2 new fields are given some values when creating an array of people and printed in display functions. 7. Compile and run in Emacs. 8. Add function changeLocation lab03structs.c that takes one Person variable and a latitude and a longitude values for that person's house (3 arguments all together). Change the existing latitude and longitude for that person's address to the new ones. Test in main by passing one of the array records to this function along with some new latitude and longitude values. 9. Compile and run in Emacs. 10. Add a function changeFirstName to lab03structs.c that takes one Person variable and a new first name for that person. Change the existing name to this new name. Assume that the new first name is of appropriate length (no error checking required). Test in main by passing one of the array records to this function along with a new first name. 11. Compile and run in Emacs. Take a couple of screenshots that show you edited and ran the code in Emacs. Do it for each lab partner since we are working remotely this quarter. #include include struct address_tag int houseNum; char street [30]: char city [38]: char state[3] }; typedef struct address_tag Address, struct person tag char first Name [20]; char last Name[20]: Address addr: 2: typedef struct person tag Person: void printAddress(Address addr) void print Person (Person per) void displayPeople (Person ppl. int pp.count) vaid addPerson(Person newPerson, Person ppl. int pp Count): void moveToTacoma(Person *per) void moveAllToTacoma(Person ppl [], int ppl Count); int main(void) { Person people [10] [ "Joseph" "Miller" ( 10. "Downing", "London" "WA}). { "Anne" "Simpson". 1600. "Pennsylvania Ave". "columbia", "WA" } }, [ "Peter", "Price" (832. "Main St. "Dallas". "TX" } } } int peopleCount = 3; displayPeople (people, peopleCount); Person historicFigure - "Thea", "Foss 17 Prospect St., Tac "WA"}} addPerson(historicFigure, people, peopleCount); displayPeople (people, peopleCount)! moveAllToTacoma (people, peopleCount); printf("After massive relocation "); displayPeople (people, peopleCount): return 0; Now this works 3 void printAddress (Address addr) E printf("%s ", addr. houseNum, addr.street); printf("%s ", addr.city addr.state): } void printPerson(Person per) { printf("%s, %s ", per.lastName, per.first Name); printAddress(per.addr); } void displayPeople(Person ppl[], int pplCount) { int i; for (i = 0; i addr.city, "Tacoma"); strcpy(per ->addr.state, "WA"); void moveAllToTacoma(Person ppl[], int ppl Count) { int i = 0; for (i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!