The last ruler of the Mughal dynasty was

Aurangzeb
Bahadurshah Zafar
Jahangir
Akbar

The correct answer is: B. Bahadurshah Zafar.

Bahadur Shah Zafar was the last Mughal emperor of India. He ruled from 1837 to 1857, during the Indian Rebellion of 1857, also known as the Sepoy Mutiny. After the rebellion was suppressed, Bahadur Shah Zafar was exiled to Rangoon (now Yangon) in Burma, where he died in 1862.

Aurangzeb was the sixth Mughal emperor, who ruled from 1658 to 1707. He was a powerful and ruthless ruler who expanded the Mughal empire to its greatest extent. However, his reign was also marked by religious persecution and political instability.

Jahangir was the fifth Mughal emperor, who ruled from 1605 to 1627. He was a cultured and cosmopolitan ruler who was interested in art, music, and literature. However, his reign was also marked by political instability and conflict with his son, Aurangzeb.

Akbar was the third Mughal emperor, who ruled from 1556 to 1605. He was a brilliant military strategist and administrator who unified the Mughal empire and brought it to its golden age. He was also a tolerant and progressive ruler who promoted religious harmony and cultural exchange.