a smart alec/aleck
An impudent or obnoxiously self-assertive individual, a wise guy, as in New teachers often have a hard time coping with the smart alecks in their classes. This expression, dating from the mid-1800s, probably alluded to a person of this description who was named Alec or Alexander, but his identity has been lost.
a smart alecBRITISH or
a smart aleck
A smart alec or a smart aleck is someone who is very clever and who is often able to answer questions in a clever way. Note: People sometimes spell `alec' and `aleck' with capital initials, as names. They've got some smart alec of a lawyer from London to oppose bail. Note: You can use smart alec and smart aleck before a noun. I hate smart-aleck kids who talk like dictionaries. Note: You use this expression to show that you find someone annoying. Note: Alec or Aleck is a shortened form of the name Alexander.
smart alec (or aleck)a person considered irritating because they know a great deal or always have a clever answer to a question.
From the male personal name Alec, a short form of Alexander.