Determining a corn snake's gender can be done by one of three methods: popping, probing and visual techniques, according to the Utah Veterinary Clinic. The first two methods should only be done by professionals, as they can harm the snake if done incorrectly.
Popping is the process of applying pressure on a young corn snake in such a way that their genitalia will pop out, thus allowing their gender to be ascertained. Probing is done by inserting a small tool into the corn snake near the area of the genitalia; the distance that the tool can be inserted into the snake reveals the gender. Visual techniques are much safer, but they aren't foolproof. For example, male corn snakes will generally have longer tails than their female counterparts and will tend to be thinner overall.