I can't be 100% sure on anything, and I don't understand what you mean when you say "but assume that the teacher is wrong anyway." I mean, I don't assume he's just wrong. He just says something that sounds the opposite of what the book says and how I've been writing programs. So I just raise my hand because to me, he obviously made a mistake.
Criticize might have been the wrong word to use there if that's what it means. But how is it disrespectful to point out a lecturer's error? To simplify the situations, Imagine hearing the lecturer say something that you understand as being incorrect. You raise your hand and give a sufficient explanation on why it's incorrect, lecturer disagrees, you explain in more detail, he disagrees again, and the conversation naturally ends because it's going nowhere and now you recognize you might have been wrong. Then, every time you do this you go back and verify it in the book and code, and turns out the book and code agrees with you.
While typing this I figured out a fault. I never go back the next time and show him evidence on why he was wrong (I'd never do that of course because it would be forceful, awkward, and would appear to him like I'm doing it with malicious intent). There's no time to do it mid-conversation during a lecture, so from his side, I'm wrong, and from my side, he's wrong. Won't try to correct him during lecture now.
But when it comes to quizzes and exams, it's just completely unfair. There's such clear errors in it, and those errors are costing the grades of everyone in the class. But the fact that no one in class is speaking up is really making me doubt myself. The errors to me are clear to the point where if some, that I verified to be false, would be pointed out to be correct, would make me think I'm suffering from some sort of mental disability. I really hope I'm not but kind of worried now.
Thanks for chatting with me. This is important because I don't want to go around unknowingly hurting others.