Section 244 in The Code of Criminal Procedure
Title: Evidence for prosecution
(1) When, in any warrant-case instituted otherwise than on a police report, the accused appears or is brought before a Magistrate, the Magistrate shall proceed to hear the prosecution and take all such evidence as may be produced in support of the prosecution.
(2) The Magistrate may, on the application of the prosecution, issue a summons to any of its witnesses directing him to attend or to produce any document or other thing.
Title: When accused shall be discharged
(1) If, upon taking all the evidence referred to in section 244, the Magistrate considers, for reasons to be recorded, that no case against the accused has been made out which, if unrebutted, would warrant his conviction, the Magistrate shall discharge him.
(2) Nothing in this section shall be deemed to prevent a Magistrate from discharging the accused at any previous stage of the case if, for reasons to be recorded by such Magistrate, he considers the charge to be groundless.
Title: Procedure where accused is not discharged
(1) If, when such evidence has been taken, or at any previous stage of the case, the Magistrate is of opinion that there is ground for presuming that the accused has committed an offence triable under this Chapter, which such Magistrate is competent to try and which, in his opinion, could be adequately punished by him, he shall frame in writing a charge against the accused.
(2) The charge shall then be read and explained to the accused, and he shall be asked whether he pleads guilty or has any defence to make.
(3) If the accused pleads guilty, the Magistrate shall record the plea, and may, in his discretion, convict him thereon.
(4) If the accused refuses to plead, or does not plead or claims to be tried or if the accused is not convicted under sub-section (3), he shall be required to state, at the commencement of the next hearing of the case, or, if the Magistrate for reasons to be recorded in writing so thinks fit, forthwith, whether he wishes to cross-examine any, and, if so, which, of the witnesses for the prosecution whose evidence has been taken.
(5) If he says he does so wish, the witnesses named by him shall be recalled and, after cross-examination and reexamination (if any), they shall be discharged.
(6) The evidence of any remaining witnesses for the prosecution shall next be taken, and after crossexamination and re-examination (if any), they shall also be discharged.
Title: Evidence for defence
The accused shall then be called upon to enter upon his defence and produce his evidence; and the provisions of section 243 shall apply to the case.
Title: Acquittal or conviction
(1) If, in any case under this Chapter in which a charge has been framed, the Magistrate finds the accused not guilty, he shall record an order of acquittal.
(2) Where, in any case under this Chapter, the Magistrate finds the accused guilty, but does not proceed in accordance with the provisions of section 325 or section 360, he shall, after hearing the accused on the question of sentence, pass sentence upon him according to law.
(3) Where, in any case under this Chapter, a previous conviction is charged under the provisions of sub-section (7) of section 211 and the accused does not admit that he has been previously convicted as alleged in the charge, the Magistrate may, after he has convicted the said accused, take evidence in respect of the alleged previous conviction, and shall record a finding thereon:
Provided that no such charge shall be read out by the Magistrate nor shall the accused be asked to plead thereto nor shall the previous conviction be referred to by the prosecution or in any evidence adduced by it, unless and until the accused has been convicted under sub-section (2).