The correct answer is: C. In their profit sharing ratio.

In the absence of any contract to the contrary, profit on dissolution of a partnership firm is credited to the partner's capital accounts in their profit sharing ratio. This is because the profit sharing ratio is the ratio in which the partners agree to share the profits of the partnership. It is usually specified in the partnership agreement. If there is no partnership agreement, or if the partnership agreement does not specify the profit sharing ratio, then the profit sharing ratio is presumed to be equal.

Option A is incorrect because the capitals of the partners just before dissolution are not relevant to the profit sharing ratio. The profit sharing ratio is determined by the agreement of the partners, or by the law if there is no agreement.

Option B is incorrect because the capitals of the partners as originally contributed by them are not relevant to the profit sharing ratio. The profit sharing ratio is determined by the agreement of the partners, or by the law if there is no agreement.

Option D is incorrect because there is a correct answer to the question.