Answer
diameter = 4
Work Step by Step
The volume formula for a cylinder is $\pi r^2 h$.
We know:
total volume = $40\pi$
height = $10$
So, we have a formula that looks like this:
$\pi r^2 * 10 = 40\pi$
divide by pi on both sides:
$r^2*10 = 40$
divide by 10 on both sides:
$r^2 = 4$
and get the square root on each side:
$r = 2$
We need the diameter however, and d = 2*r:
so $d = 2*2$
$d = 4$