#include #include struct Pair { int x, y; }; struct Pair *new_pair() { struct Pair *tmp_point = malloc( sizeof( struct Pair ) ); (*tmp_point).x = 91; (*tmp_point).y = 42; return tmp_point; } int main() { struct Pair *ptr = new_pair(); printf( "(%d, %d)\n", (*ptr).x, (*ptr).y ); (*ptr).y = -42; printf( "(%d, %d)\n", (*ptr).x, (*ptr).y ); free( ptr ); ptr = NULL; return 0; }