These two structures are associated with the religious architecture of early Buddhism. Viharas were for the purpose of living, Monks after their year long begging take rest during winter season in viharas. Stupa is a commemorative monument usually housing sacred relics associated with the Buddha or other saintly persons. such relics are not used in viharas. The hemispherical form of the stupa appears to have derived from pre-Buddhist burial mounds in India. viharas are like living rooms, few viharas are constructed in caves also.
Some of the learners also asked: What is viharas ?