Is that correct to use "Or What" in sentences.

I have sometimes noticed the usages of “or what” on the end of sentences

eg: why are you advising me, are you a doctor or what ?

How can you do such problems, are you a engineer or what?

Is that correct usages? somebody please clarify my doubt.

This is a common colloquial expression. Use it carefully because it can sound hostile.