Tomatoes are commonly used in salads, sauces, soups, and many other savory dishes. Because they are rarely served as desserts, most people naturally think of them as vegetables.
However, from a botanical perspective, a tomato develops from the flower of a plant and contains seeds. By scientific definition, that makes it a fruit.
This is why tomatoes frequently appear in quizzes and trick questions. In everyday cooking, they are treated like vegetables, but in plant science, they belong to a different category.

What About Carrots?
Carrots are much more straightforward.