Smarty pants

A person who is annoying because they always have an answer or seem to know everything.

The boy is a smarty pants and he acts like he knows everything.