Step 1: Understanding the question.
At standard temperature and pressure (S.T.P.), 1 mole of any gas occupies 22.4 dm\(^3\) of volume. We are given the volume of ammonia as 5.6 dm\(^3\). To calculate the number of moles, we can use the relationship:
\[
\text{Number of moles} = \frac{\text{Volume of gas}}{\text{Molar volume at S.T.P.}}
\]
Step 2: Calculating the moles.
Using the formula, we get:
\[
\text{Number of moles} = \frac{5.6 \, \text{dm}^3}{22.4 \, \text{dm}^3/\text{mol}} = 0.25 \, \text{moles}
\]
Step 3: Conclusion.
The number of moles of ammonia in 5.6 dm\(^3\) at S.T.P. is 0.25 moles, so the correct answer is (D).