Instructions:
Input
1. A series of ages and genders of the 5 Persons
Source Code:
#includetypedef struct { int age; char gender;} Person;void displayPerson(Person);int main(void) { Person persons[5]; 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"); } printf("\n\n");}
typedef struct { int age; char gender;} Person;
void displayPerson(Person);
int main(void) { Person persons[5];
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"); } printf("\n\n");}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here