Step 1: Understanding the Concept
Pepsin is a protein-digesting enzyme. It is made by the chief (peptic) cells of the gastric glands.
Step 2: Where it works
Pepsin is released as inactive pepsinogen, which is activated by \(\text{HCl}\) from the oxyntic cells. It then breaks proteins into proteoses and peptones in the stomach.
Step 3: Compare the options
The oesophagus secretes no digestive enzymes. In the duodenum and ileum, proteins are digested by trypsin, chymotrypsin and peptidases.
Final Answer:
Pepsin is secreted in the stomach.
\[ \boxed{\text{(B) }\text{stomach}} \]