Is "give an exam" grammatical for "writing the answers to exam"?

Solution 1:

It depends on what it means. In American English, students take an exam, while professors give an exam. This is very normal usage.

The metaphor is that the professor provides something, and the students accept it, which is straightforward in any educational context.

On the other hand, you didn't provide any examples, so I suppose it's possible that your students might use the phrase give an exam to refer to what the student does, rather than what the professor does (i.e. setting, composing, or presenting an exam). This usage would be decidedly odd in American English, and potentially confusing.

"Ugly", on the other hand, is a personal esthetic judgement; my experience is that personal judgements of beauty and its opposite vary enormously, and have nothing to do with language per se.

Solution 2:

We all have our likes and dislikes about language, Pandey. We’re entitled to them and we’re entitled to express them. What we’re not entitled to do is to claim that our preferences represent the only acceptable forms of the language. English comes in many, many varieties. Indian English is one them and your experience suggests there are varieties within Indian English itself. I have not heard either of the terms you mention, but then I live in the UK where the normal British English expression is take an exam or sit an exam. There is nothing intrinsically ‘ugly’ about give an exam and I suspect your aversion to it is based on nothing more than the fact that it is not used in the part of India where, I assume, you live.