If opening stock is Rs. 10,000, purchases Rs. 30,000 direct expenses Rs. 4,000 and closing stock Rs. 5,000, the cost of goods sold would be:

Rs. 39,000
Rs. 40,000
Rs. 41,000
Rs. 44,000

The correct answer is: B. Rs. 40,000

Cost of goods sold is the value of the goods that a company has sold during a period. It is calculated by taking the beginning inventory, adding the cost of goods purchased, and then subtracting the ending inventory.

In this case, the beginning inventory is Rs. 10,000, the cost of goods purchased is Rs. 30,000, and the ending inventory is Rs. 5,000. Therefore, the cost of goods sold is:

Cost of goods sold = Beginning inventory + Cost of goods purchased – Ending inventory
= Rs. 10,000 + Rs. 30,000 – Rs. 5,000
= Rs. 40,000

Option A is incorrect because it does not subtract the ending inventory from the cost of goods purchased. Option C is incorrect because it adds the direct expenses to the cost of goods sold. Option D is incorrect because it adds the beginning inventory to the cost of goods purchased.