Many people may mistakenly think that corn is a vegetable, but it’s actually a fruit. However, in certain circumstances, it can be classified as a vegetable, a grain, or a fruit.
According to Britannica, botanists classify corn as a fruit because the kernels are "the fleshy or dry ripened ovary of a flowering plant, enclosing the seed or seeds."
Vegetables are edible roots, stems, flowers, or leaves and do not contain seeds. Corn is considered a starchy vegetable, like potatoes or peas, based on how fresh corn is eaten.
Technically, corn is a caryopsis, otherwise referred to as grains. These single-seeded dry fruits appear in grasses, so much like rice and wheat, corn is both a fruit and a grain.