  We investigate the weak cosmic censorship conjecture in charged anti-de
Sitter black holes with thermodynamic pressure and volume by the scattering of
the charged scalar field in four and higher dimensions. We assume that the
internal energy and electric charge of the black hole changes infinitesimally
according to the energy and charge fluxes of the scalar field. Then, found to
be an isobaric process, the changes in the black hole can be well reproduced to
the first law of thermodynamics, although we find that the second law of
thermodynamics is violated in extremal and near-extremal black holes.
Nevertheless, the weak cosmic censorship conjecture remains valid, because the
extremality of a black hole is invariant despite changes in internal energy and
electric charge.
