By using the concept of structure, write a program that use structure tag name struct Person of five (5) persons that consist variable name, age, gender and address. Each person must have different addresses whereby another structure called struct Address need to be derived from each person. struct Address must consist of variable roadname, state, and zipcode. Any member of a structure, use the member access operator (.) to output the data of these five (5) persons.
To reveal your code’s functionality, your output should have similar layout as below :
NAME: LUKE SKYWALKER AGE: 29
ROADNAME: 107, NEBULA STAR,GALAXY FAR FAR AWAY
Leave a comment