Corn—what a plant. Each individual kernel is its own fruit, the cob is very nearly a separate fruit, some types are vegetables, and corn is generally a grain. It truly is marvelous. It is the most-produced crop on earth. People eat it raw, cooked, creamed, baked, ground-up, popped, as syrup, and in desserts; we use it to create ethanol for our cars; and cattle eat as much corn as humanity several times over.
However not all corn is the same. While people may just think of corn as a monolith, there are actually many different types of corn, and different types of corn have different classifications. All the corn that you eat whole is going to be sweet corn, which is a type of corn which is eaten as a vegetable. However this type of corn is actually only a very, very small percentage of our overall corn production. There are several other types of corn, but the main one grown is dent corn. This is the vast majority of the corn produced, and is mostly used for cattle feed, but still makes up the great majority of corn consumed by humans as well. Since it is dried and ground up before being eaten, dent corn is a grain.