#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct point
{
int x;
int y;
void (*print)(const struct point*);
};
void print_x(const struct point* p)
{
}
void print_y(const struct point* p)
{
}
int main(void)
{
struct point p1 = { 2, 4, print_x };
struct point p2 = { 7, 1, print_y };
p1.print(&p1);
p2.print(&p2);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPHN0ZGxpYi5oPgoKc3RydWN0IHBvaW50CnsKICAgIGludCB4OwogICAgaW50IHk7CiAgICB2b2lkICgqcHJpbnQpKGNvbnN0IHN0cnVjdCBwb2ludCopOwp9OwoKdm9pZCBwcmludF94KGNvbnN0IHN0cnVjdCBwb2ludCogcCkKewogICAgcHJpbnRmKCJ4PSVkXG4iLCBwLT54KTsKfQoKdm9pZCBwcmludF95KGNvbnN0IHN0cnVjdCBwb2ludCogcCkKewogICAgcHJpbnRmKCJ5PSVkXG4iLCBwLT55KTsKfQoKaW50IG1haW4odm9pZCkKewogICAgc3RydWN0IHBvaW50IHAxID0geyAyLCA0LCBwcmludF94IH07CiAgICBzdHJ1Y3QgcG9pbnQgcDIgPSB7IDcsIDEsIHByaW50X3kgfTsKCiAgICBwMS5wcmludCgmcDEpOwoKICAgIHAyLnByaW50KCZwMik7CgogICAgcmV0dXJuIDA7Cn0K