They are both grammatically correct as shortened forms for:
What did you say?
Pardon me, I did not hear that. or Pardon me, can you please repeat that.
Only in the most casual settings should you use the shortened form, in any other setting, public, professional, etc. you should use the complete sentence, whichever one you choose.
It is grammatically correct to say: There is nothing wrong with this machine.It is not grammatically correct to say: Will it is be grammatically correct to say ....The correct way to write that or say that would be: Would it be grammatically correct to say....
This question is not clear on exactly what you are asking. What type of sentence are you using the word "what" in? If you are simply asking can one say "What?", then yes, that would be correct but not very mannerly. It is more polite to say "Pardon?" or "Excuse Me?".
'What a drunkard you are' is a grammatically correct English sentence.
"Media is here to stay" is the correct phrasing because "media" is a collective noun referring to a singular concept, so it should be paired with a singular verb "is."
No. Him and me is correct.
This sentence is grammatically correct.
It is grammatically correct to say , "I am in school today." This is because you are in the building, not at the building.
no
yes
Yes, it is correct to say "for forever." This phrase is often used informally to emphasize the idea of something lasting indefinitely or forever.
It could depend on what it is you are trying to say, but as it is it is grammatically correct.
Grammatically correct, maybe, but idiomatically wrong. We normally say "buy it for me."