UNIT 69.8

Run Settings
LanguageC
Language Version
Run Command
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> struct Person { char name[30]; int age; void (*print)(struct Person *); }; void print(struct Person *p) { printf("%s %d\n", p->name, p->age); } void print_prettier(struct Person *p) { printf("%s(%d)\n", p->name, p->age); } void print_exotic(struct Person *p) { printf("%s***%d***\n", p->name, p->age); } int main() { struct Person p[3]; p[0].print = print; p[1].print = print_prettier; p[2].print = print_exotic; scanf("%s %d %s %d %s %d", p[0].name, &p[0].age, p[1].name, &p[1].age, p[2].name, &p[2].age ); p[0].print(&p[0]); p[1].print(&p[1]); p[2].print(&p[2]); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines