Who is authorized under CrPC to take down the statement of witnesses or accussd

Who is authorized under CrPC to take down the statement of witnesses or accussd

Explanation

Section 161 of CrPC 1898