The correct answer is: A. Shifted upwards.

When an empty cylinder is half filled with a liquid, the center of gravity of the cylinder shifts upwards. This is because the liquid adds mass to the top of the cylinder, which raises the center of gravity. The amount of upward shift depends on the density of the liquid. The denser the liquid, the more it will raise the center of gravity.

Option B is incorrect because the center of gravity does shift upwards. Option C is incorrect because the center of gravity does shift. Option D is incorrect because the center of gravity shifts upwards, regardless of the density of the liquid.