TV: Eric Cartman. He embodies both the instant on-the-spot smartass as well as the plotting, vengeful smartass that sets people up to be the victims of his smartassery.
Movies: ... Groucho Marx is the patron saint of smartasses, so yeah, I'll go with him as the greatest. Easily, now that I think about it.