Question: c programming complete the following program by declare an enum...
Complete the following program by:
- Declare an enum "agegroup" with 5 values: infant, children, teen, adult and elderly;
- Declare a struct called "customer" that contains a string field "name", a integer field "memberId", and an enum agegroup field "ageGroup";
- Write the CreateCustomerRecord function that mallocs a new customer record and returns its reference to the caller.
Be reminded that the upper/lower cases for the names are important. The framework of the program is given below. Fill it in so it will run with proper output:
// insert struct/enum declarations
typedef struct customer Customer;
typedef enum agegroup AgeGroup;
// insert the CreateCustomerRecord function
c = CreateCustomerRecord("John Chan",1234,adult);
printf("%s %d %d\n",c->name,c->memberId,c->ageGroup);