Reference no: EM132194776
Question: Write a C program that contains a structure that uses predefined types and union.
• Create a struct with name, age, kind (Either child, college student, or adult), and kindOfPerson (Either kid, student, or adult)
• kids have a school field. Students have college and gpa. Adults have company and salary.
• Create one non-dynamic struct with the content for a college student: "Bob", 20, K-State, 3.5
• Create one struct dynamically for a kid with: "Alison", 10, "Amanda Arnold Elementary"
• Implement a function that can be used to display the contents of a single structure
• Print out both structures
• Free up the memory allocated before exiting