There are certain snakes which are known for being cannibalistic, such as king snakes. Although most snakes do not exhibit cannibalistic behavior, there are some which have been known to in the wild as well as in captivity. It is important for those who keep snakes as pets to remember that certain types do eat each other sometimes, so they should not be kept together under any circumstances.
For the most part though, snakes are not known for eating each other. The King Snake is one of the few types of snakes which do in fact eat its own kind, though this is not an extremely common occurrence.