In the beginning mainwe have
m=3 n=5 // int m = 3, n = 5;
then we call F(m, &n), passing mby value, and a npointer such that
m = 3 n = 5
a = 3 b->n // F(m, &n);
Now, inside F(), we assign 7 a:
m = 3 n = 5
a = 7 b->n // a = 7
then we assign a(= 7) the memory address indicated by b(-> n)
m = 3 n = 7
a = 7 b->n // *b = a;
Next, we change b, so now it bpoints to a:
m = 3 n = 7
a = 7 b->a // b = &a;
4 , b (- > a)
m = 3 n = 7
a = 4 b->a // *b = 4;
a (= 4) *b (- > a = 4)
m (= 3) n (= 7)