Correct option is B
The offense committed by 'A' is defined under Section 382 of the Indian Penal Code, 1860. Section 382 deals with theft accompanied by preparation for causing death, hurt, or restraint in case the victim resists. In this scenario, 'A' commits theft while carrying a loaded pistol under his garments, intending to hurt 'B' in case of resistance. This preparation to cause harm classifies the offense under Section 382 rather than simple theft under Section 378.