Russian does not have a class of helping (auxiliary -"to be", "to have") verbs.
Thus, in Russian interrogative sentences, word order is the same as in the affirmative sentences.
In case it is a yes/no question, you can differentiate between interrogative and affirmative sentence only by the intonation. Compare:
Книга на столе. A book is on a table.
Книга на столе? Is the book on the table?
If the question has an interrogative, question word is usually placed at the front position in the sentence.
Где книга? - Книга на столе.
Where is the book? - The book is on the table.
There is no strict or preserved word order in interrogative sentences, though.
Где ты был вчера?
Where were you (male) yesterday?
Ты где был вчера?
When would it be appropriate to write "Ты где ... ?" instead of "Где ты ... ?"?
Thank you for your question.
The first variant (Где ты...) is a common usage. I've already written that question words tend to
be at the beginning of the sentence.
The second variant is more colloquial and emotional, from my point of view at least. I must admit that it is not used often. This kind of subtlety is difficult for learners to master. I guess that only my audio with these two sentences can help you to distinguish the difference in the intonation.
While thinking about these sentences, I’ve realized a very interesting thing. If a pronoun is the subject of an interrogative sentence, it always precedes the predicate.
Correct: Где ты был вчера?
Correct: Ты где был вчера?
Incorrect: Где был ты вчера?
Incorrect: Где вчера был ты?
(You may come across the last two sentences in poems, when special rhymes are desired.)
But it is optional with a noun subject:
Correct: Где был Марк вчера?
Correct: Где Марк был вчера?
Correct: Где вчера был Марк?
Depending on what you want to emphasize, the word order can change to suit your needs as the sentence emphasis is always on the last word(s).
I hope this helps a bit :)
Thanks, Olga, it's very, very helpful!