The calls pb->p(), pd->p() and pd2->p() are dynamically bound since the function p is virtual, and it is called through a pointer. All the other calls are statically bound.

    B::p
    B::q
    D::p
    D::q
    B::p
    B::q
    D::p  <-  note the result of pd->p()
    B::q
    D::p
    D::q