Acid in answer D is used to neutralize the base to stop the reaction, to end with a terminal alkyne. If base is in access, the reaction may keep on going to make an internal alkyne.
First Br2 and CCl4 makes a viscinal halide, Then Excess NaNH2 and NH3 make a triple bond. Water just washes off the sodium at the end and protonates the Carbanion.
Acid and heat is used to make a double bond from a secondary or tertiary halide.
Hope this helps.