The density of a substance can be calculated using the formula:
\[ \text{Density} = \frac{\text{Mass}}{\text{Volume}} \]
In the given example, the mass of the liquid is 42 grams and the volume is 35 cubic centimeters. To find the density, you divide the mass by the volume using the formula above:
\[ \text{Density} = \frac{42 \text{ grams}}{35 \text{ cm}^3} \]
When we do the division:
\[ \text{Density} = 1.2 \text{ grams/cm}^3 \]
Therefore, the density of the liquid is \( 1.2 \text{ grams/cm}^3 \).