A trick question was a question for which there was either no right answer, an obvious but wrong answer and a sneaky correct one, or which forced one to concede a point.
(DIS: "Choose Your Pain")
After taking the Starfleet Academy entrance exam in 2364, Wesley Crusher realized the last question was a trick, as matter-antimatter ratio was 1-1. (TNG: "Coming of Age")
In 2369, Julian Bashir claimed his mistaking a preganglionic fiber for a postganglionic nerve during his final exam for Starfleet Medical was a trick question that prevented him from becoming valedictorian. (DS9: "Q-Less")
(DS9: "The Assignment")
(VOY: "Spirit Folk")