There are 511 sections in Indian penal code. It is a substantive law. Accused gets punishments according the sections of Indian penal code. It us also called IPC.