C program
Complete the following program by:
- Declare an enum “agegroup” with 5 values:infant, children, teen, adult and elderly;
- Declare a struct called “customer” thatcontains a string field “name“, a integer field”memberId“, and an enum agegroup field”ageGroup“;
- Write the CreateCustomerRecord function thatmallocs a new customer record and returns itsreference to the caller.
Be reminded that the upper/lower cases for the names areimportant. The framework of the program is given below. Fill it inso it will run with proper output:
#include <stdio.h>
#include <stdlib.h>
// insert struct/enum declarations
typedef struct customer Customer;
typedef enum agegroup AgeGroup;
// insert the CreateCustomerRecord function
int main()
{
Customer *c;
c = CreateCustomerRecord(“JohnChan”,1234,adult);
printf(“%s %d%dn”,c->name,c->memberId,c->ageGroup);
return 0;
}
Expert
OR
PayPal Gateway not configured
OR
PayPal Gateway not configured
PayPal Gateway not configured
PayPal Gateway not configured