If you've spotted whole kernels of corn in the toilet and wondered whether something's wrong, here's the short answer: it's probably nothing. It's one of the most normal things your digestive system does, and it happens to just about everyone. The bright yellow color of corn just makes it obvious.
Why corn survives the trip
Corn kernels have a tough outer shell made of cellulose, a type of fiber your body can't break down. Humans don't make the enzyme needed to digest it, so while your gut happily absorbs the soft, starchy inside of the kernel, the yellow skin passes through fully intact. What you're seeing isn't undigested food exactly, it's the part of corn that was never digestible in the first place.
Nuts and seeds do the same thing for the same reason. The fibrous, shell-like parts are built to survive, so bits of almond, sesame, flax, or sunflower seed often make it through looking much like they went in. Your body took the nutrients it wanted and passed the packaging along.
"But I didn't eat corn"
This is the version that unsettles people, and for good reason. But it usually has a simple explanation.
First, timing. What shows up today isn't from today. Food often takes a day or more to travel all the way through you, so that corn is probably from a meal a day or two ago that you've stopped thinking about.
Second, look-alikes. Plenty of things resemble corn on the way out: undigested bits of nuts, quinoa, bell pepper or tomato skin, and even the empty shells of some supplement capsules can all look like little pale-yellow flecks. If you're certain corn wasn't on the menu, one of these is almost always the culprit.