Step 1: Understanding the Concept:
This question requires distinguishing between two related offences against personal liberty under the IPC: wrongful restraint and wrongful confinement. The key difference lies in the extent of the restriction of movement.
Step 2: Detailed Explanation:
\begin{itemize}
\item Wrongful Restraint (Section 339 IPC): This offence is committed when a person voluntarily obstructs another so as to prevent that person from proceeding in any direction in which that person has a right to proceed. The obstruction is partial; other directions are still open. For example, blocking a person's path on a public road.
\item Wrongful Confinement (Section 340 IPC): This is an aggravated form of wrongful restraint. It involves wrongfully restraining a person in such a manner as to prevent that person from proceeding beyond certain circumscribing limits. The restriction is total.
\end{itemize}
In the given scenario, A places men at all the outlets of a building. This prevents B from leaving the building from any direction. B's liberty of movement is completely curtailed within the confines of the building. This fits the definition of wrongful confinement.
Step 3: Final Answer:
The offence committed by A is Wrongful confinement.