Instructions:
#includetypedef struct { int age; char gender;} Person;void displayPerson(Person);int main(void) { Person father; Person mother; father.gender = 'M'; mother.gender = 'F'; return 0;}void displayPerson(Person p) { printf("PERSON DETAILS:\n"); printf("Age: %d\n", p.age); printf("Gender: "); if(p.gender == 'M') { printf("Male"); } else { printf("Female"); }}Extracted text: Input 1. The age of the Male Person 2. The age of the Female Person Output Enter the Male Person's age: 24 Enter the Female Person's age: 21 PERSON DETAILS: Age: 1 Gender: Male
typedef struct { int age; char gender;} Person;
void displayPerson(Person);
int main(void) {
Person father; Person mother;
father.gender = 'M'; mother.gender = 'F';
return 0;}
void displayPerson(Person p) { printf("PERSON DETAILS:\n"); printf("Age: %d\n", p.age); printf("Gender: "); if(p.gender == 'M') { printf("Male"); } else { printf("Female"); }}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here