#include #include "first.h" #include int main() { CLIENT * handle; /* rpc handle */ int x; int *y; account a, b; transaction t; x = 3; handle = clnt_create("127.0.0.1",first,first0,"udp"); f_1(&x,handle); /* remote procedure call */ printf("the value of x is %d\n",x); y = g_1(&x,handle); printf("the value of *y is %d\n--------------\n\n",*y); a.balance = 500; b.balance = 800; t.A = &a; t.amt = 100; withdraw_1(&t,handle); printf("the value of a.balance is now %d\n",a.balance); /* doesn't work because change made to balance is not local */ clnt_destroy(handle); exit(0); } // main /* compile with gcc firstc.c first_clnt.c first_xdr.c -o firstc on Linux. */