(a) After deducting all sums due him on account of the sale, including the expenses incurred in caring for the property so long as his responsibility for such care continued, the sheriff shall pay the proceeds of the sale to the clerk of the superior court who issued the execution, and the clerk shall furnish the sheriff a receipt therefor.
(b) The clerk shall apply the proceeds of the sale so received to the payment of the judgment upon which the execution was issued.
(c) Any surplus shall be paid by the clerk to the person legally entitled thereto if the clerk knows who such person is. If the clerk is in doubt as to who is entitled to the surplus, or if adverse claims are asserted thereto, the clerk shall hold such surplus until rights thereto are established in a special proceeding pursuant to G.S. 1-339.71. (1949, c. 719, s. 1.)