For pyramids, the volume is defined by the product of the base area and height divided by 3.  Or,  V = [tex] \frac{Bh}{3} [/tex] Where B = area of the base and h = the height of the pyramid.
For the figure above:  
B = 16 in²
h = 6 in
[tex]V =  \frac{16(6)}{3} [/tex]
V = 32