Maybe you could refuse to take the quiz, claiming it couldn't have been a surprise.
Clearly, a quiz on Friday would not be a surprise. But then, a quiz on Thursday wouldn't be a surprise either, and so on.
Since a surprise quiz was not possible under these conditions, you assumed there would be no quiz at all.
See: https://en.wikipedia.org/wiki/Unexpected_hanging_paradox
The professor tells you there will be a quiz at the end of class, but it will be a surprise. Since a quiz at the end of class wouldn't be a surprise, there can't be one at all.
Then, at the end of class, the quiz is given to your surprise.
If I were your teacher/professor, my rebuttal would be: "If you thought a quiz was impossible this week, I bet you're quite surprised."
I never faced that one but I had tactics for dealing with smart alecs. I had one guy who was a good-natured frat boy who was always trying to chisel for an extra point here or there, one day I knew he would do that so I deliberately didn't mark something that he got wrong. I gave him the point he was chiseling for but took away 5 points, which made the class laugh at his expense.
If I faced that and was on the ball I'd probably try something similar.
(Note getting the class to laugh at everybody could be seen as a form of bullying and had I tried that with 10 students maybe 1 or 2 might be really offended; on the other hand this guy got pledged by a frat so he knows you have to be the butt of a joke sometimes.)