UPSC Prelims 2013 Art & Culture

Some Buddhist rock-cut caves are called Chaityas, while the others are called Viharas. What is the difference between the two?