What is CrPC Section 151 – Code of Criminal Procedure 1973

According to Section 151 of the Code of Criminal Procedure 1973,
Arrest to prevent the commission of cognizable offences — (1) A police officer knowing of a design to commit any cognizable offence may arrest, without orders from a Magistrate and without a warrant, the person so designing, if it appears to such officer that the commission of the offence cannot be otherwise prevented.
(2) No person arrested under sub-section (1) shall be detained in custody for a period exceeding twenty-four hours from the time of his arrest unless his further detention is required or authorised under any other provisions of this Code or of any other law for the time being in force.