Referring to your post about the following sentences
a) "What on earth am I here for?" to
b) "What on earth I am here for ?"
Please look closely at your two sentences and I think you can see the answer for yourself.Which one of these is actually a question?
Remember that most questions in English require a change in word order for the subject and verb, or some form of the verb (do , did , am , etc.) must go in front of the subject, and this question is no exception.Thus, only a) is a question. Sentence b) is a strange mixture of statement word order with a question mark, and as such, is difficult for a reader /listener to process.