The primary function of a trap in a Water Closet (W.C.) system is to hold water, creating a seal that prevents foul sewer gases from entering the building.
Among the options provided, the P trap is specifically designed and commonly used for W.C. installations. Its shape allows it to effectively retain water after each flush, maintaining the necessary seal against sewer gases.
Therefore, the P trap is the correct choice for a W.C.