Indian Penal Code. The Indian Penal Code (IPC) is the main criminal code of India. It is a comprehensive code intended to cover all substantive aspects of criminal law. ... However, it did not apply automatically in the Princely states, which had their own courts and legal systems until the 1940s.