// Pointers and stuct example #include using namespace std; /* card structure definition */ struct Card { int face; // define pointer face }; /* prototype */ void passByReference(Card *c) ; int main() { Card c ; c.face = 1 ; Card *cptr; cptr= &c ; cout << "The value of c before function passing " << c.face << endl; cout << "The value of cptr before function " << cptr->face << endl; passByReference(cptr); cout << "The value of c after function passing " << c.face << endl; return 0 ; } void passByReference(Card *c) { c->face = 4; }