Central charge, trace and gravitational anomalies in two dimensions