In order to convey the feeling of 'what the heck', with any 'how', 'what', 'where' or 'why' type question, the
adverb 一体(いったい) will be used in Japanese. いったい appears frequently both with, and without kanji.
いったい will usually be seen at the beginning of sentences, before some statement about what the speaker finds unbelievable.
一体(いったい)ここで何(なに)が起(お)きたんだ!
What the heck happened here?
これは一体(いったい)どういうことだ。
What is the meaning of this?
The literal meaning of いったい is 'one body', or 'one form'. In this way, when paired with questions, いったい can be thought of meaning 'in a way that can be understood, what is (A)', or 'in a way that makes sense, what is (A)'.
一体(いったい)なんでこんな事(こと)になったの?
Explain to me in a way that makes sense, why something like this happened?
一体(いったい)なんであんな奴(やつ)と付(つ)き合(あ)ようと思(おも)ったの?
In a way that I can understand, why did you think of dating someone like him?
Like the 'one body', or 'one form' meaning mentioned above,
一体(いったい) is sometimes used to mean 'in general', or 'generally' when seen as 一体(いったい)に. However, this use is slowly becoming less common, partly due to how often
一体(いったい) is used simply to express surprise or shock.