  Graphite, as a well-known carbon-based solid, is a paradigmatic example of
the so-called van der Waals layered materials, which display a large anisotropy
in their physical properties. Here we study quantum effects in structural and
elastic properties of graphite by using path-integral molecular dynamics
simulations in the temperature range from 50 to 1500~K. This method takes into
account quantization and anharmonicity of vibrational modes in the material.
Our results are compared with those found by using classical molecular dynamics
simulations. We analyze the volume and in-plane area as functions of
temperature and external stress. The quantum motion is essential to correctly
describe the in-plane and out-of-plane thermal expansion. Quantum effects cause
also changes in the elastic properties of graphite with respect to a classical
model. At low temperature we find an appreciable decrease in the linear elastic
constants, mainly in $C_{12}$ and $C_{44}$. Quantum corrections in stiffness
constants can be in some cases even larger than 20\%. The bulk modulus and
Poisson's ratio are reduced in a 4\% and 19\%, respectively, due to zero-point
motion of the C atoms. These quantum effects in structural and elastic
properties of graphite are nonnegligible up to temperatures higher than 300~K.
