The correct answer is: C. Bhima I.
Mahmud Ghazni invaded Gujarat and ravaged the temple of Somnath in 1026 CE during the reign of Bhima I of the Chalukya dynasty. Bhima I was the son of Jayasimha II and succeeded him to the throne in 1022 CE. He ruled Gujarat for 14 years until his death in 1036 CE.
Bhima I was a powerful and capable ruler who expanded the Chalukya kingdom to its greatest extent. He was also a patron of the arts and literature. The Somnath temple was one of the most important Hindu temples in India and was a major pilgrimage site. Mahmud Ghazni was a Muslim ruler from Afghanistan who invaded India several times in the 11th century. He was known for his brutality and his destruction of Hindu temples.
In 1026 CE, Mahmud Ghazni invaded Gujarat and sacked the Somnath temple. He looted the temple of its wealth and destroyed its idols. The destruction of the Somnath temple was a major blow to the Hindu community in India. It was also a symbol of the power and aggression of Mahmud Ghazni.
The invasion of Gujarat and the destruction of the Somnath temple had a profound impact on the history of India. It led to a decline in the power of the Chalukya dynasty and it also contributed to the rise of Hindu revivalism in the 12th century.