Step 1: Understanding the Concept
Basic strength depends on the availability of the nitrogen lone pair. Alkyl groups push electrons and make the lone pair more available. In aniline the lone pair is delocalised into the ring.
Step 2: Detailed Explanation
Dimethylamine has two electron-donating methyl groups, so it is more basic than methylamine.
Methylamine is more basic than ammonia, which has no alkyl group.
Aniline is the weakest base, as the lone pair is spread over the benzene ring by resonance.
Order: \((\text{CH}_3)_2\text{NH} > \text{CH}_3\text{NH}_2 > \text{NH}_3 > \text{C}_6\text{H}_5\text{NH}_2\).
Final Answer:
The order is dimethylamine, methylamine, ammonia, aniline, option (B).
\[ \boxed{(\text{CH}_3)_2\text{NH} > \text{CH}_3\text{NH}_2 > \text{NH}_3 > \text{C}_6\text{H}_5\text{NH}_2\ \text{(B)}} \]