Answer:
Some dinosaurs ate lizards, turtles, eggs, or early
mammals. Some hunted other dinosaurs or scavenged dead
animals. Most, however, ate plants (but not grass,
which hadn't evolved yet). Rocks that contains
dinosaur bones also contain fossil pollen and spores
that indicate hundreds to thousands of types of plants
existed during the Mesozoic Era. Many of these plants
had edible leaves, including evergreen conifers (pine
trees, redwoods, and their relatives), ferns, mosses,
horsetail rushes, cycads, ginkos, and in the latter
part of the dinosaur age flowering (fruiting) plants.
Although the exact time of origin for flowering plants
is still uncertain, the last of the dinosaurs
certainly had fruit available to eat.