Quoi vs Que
Just wondering how flexible these words are. There seem to be many examples of the form:
Could you also say, Quoi manges-tu? Manges-tu quoi? Manges-tu que?
(Though the last one sounds weird to me)
The example above is tricky and it does not address your question right. The reason why you use "quoi" in "Tu manges quoi? is that the interrogative pronoun is placed at the end of the sentence. Look at grammar rules in "Questions" and you will see that you normally use "Que manges-tu?" or "Tu-manges quoi?"
Quoi only appears in questions as the second word, directly after the preposition. Typical prepositions are de, à, sur, sous, en, pour (in this case, both words are written together in pourquoi). For example: "de quoi parles-tu ?" (what are you talking about?); "à quoi fais-tu allusion?" (what are you referring to?)
No. It's not exactly like that. When the words mean "what" (interrogative adjective), "que" is used at the start of the sentence and "quoi" everywhere else.
English uses the word 'what' in a lot of different grammatical contexts, whereas French distinguishes between some of them. So although 'quoi' and 'que' both translate as 'what,' they're not interchangeable. For that sentence, it would normally be "Que manges-tu?" because the 'what' is the missing object of the sentence. In informal speech you could also say "Tu manges quoi?" which sounds a little incredulous. And 'quoi' is always used after a preposition ("De quoi parles-tu?")