Now why would you do that? That is the problem with the world today no respect for a person who is teaching you. If you have a grievance against a teacher, there are more civilized ways than flipping him off.
You have the constitutional right of speech, which can include gestures. Inciting language and gestures are excepted http://en.m.wikipedia.org/wiki/United_States_free_speech_exceptions and schools have certain limits on speech and other freedoms, as the court has found that certain rights are not without limitation. For example, schools may have a dress code, a Conduct code, and other limits on freedoms.