Since cucumbers are used in soups, stews, and of course, salads in which vegetables dominate, many people mistake them for vegetables despite their seeds.
Pickles, which are simply pickled cucumbers, are often found in sandwiches and burgers alongside vegetables, but they are also classified as a fruit — albeit a pickled one.
Pickles still contain the seeds that cucumbers have, and though you won't find a "pickle flower" out in the wild, they still originate from the flower of the cucumber plant.