  We formulate $f(Q,C)$ gravity and cosmology. Such a construction is based on
the symmetric teleparallel geometry, but apart form the non-metricity scalar
$Q$ we incorporate in the Lagrangian the boundary term $C$ of its difference
form the standard Levi-Civita Ricci scalar $\mathring R$. We extract the
general metric and affine connection field equations, we apply them at a
cosmological framework, and adopting three different types of symmetric
teleparallel affine connections we obtain the modified Friedmann equations. As
we show, we acquire an effective dark-energy sector of geometrical origin,
which can lead to interesting cosmological phenomenology. Additionally, we may
obtain an effective interaction between matter and dark energy. Finally,
examining a specific model, we show that we can obtain the usual thermal
history of the universe, with the sequence of matter and dark-energy epochs,
while the effective dark-energy equation-of-state parameter can be
quintessence-like, phantom-like, or cross the phantom-divide during evolution.
