Correct Option (B):
Chaityas are Buddhist rock-cut caves that served as prayer halls or places of worship. They typically feature a stupa at the far end, which is the object of veneration, and an axial nave for congregational rituals. Viharas, in contrast, were monastic dwelling places or residential complexes for Buddhist monks and nuns. These structures usually consisted of a central courtyard surrounded by small cells for living, studying, and meditation.
Incorrect Options:
Option (A) is incorrect because it reverses the functions of Chaityas and Viharas. Chaityas were places of worship, while Viharas were dwelling places for monks.
Option (C) is partially correct regarding the Chaitya (stupa at the far end), but incorrect for the Vihara. A Vihara is not merely a hall axial to the stupa; it is a complete monastic complex with living quarters, distinct from the prayer hall function of a Chaitya.
Option (D) is incorrect because there is a fundamental and material difference in the primary function and architectural layout between Chaityas (worship halls) and Viharas (monastic residences).