Which city do you live in? is usually heard in speech while In which city do you live? is usually used in written English.
They are both correct.
Or should we say, neither is correct or incorrect?!
Correct Answer
The way you ask that question depends on the situation and circumstances.
"Which city do you live in?" is grammatically correct and can be used in formal speech.
"In which city do you live" is a more informal way, which you can find in written English and friendly banter.
So go ahead and use both as you please. That's the joy and beauty of the English language.
What city do you live in?
You may also come across the question, "what city do you live in?" It's also a correct way to say, but there's a slight difference between "what city do you live in" and "which city do you live in."
"Which" goes for a limited description. For example, if you already know the country your friend lives in, you can ask:
"Which city in Belgium do you live in?"
"What" is more general and can describe a larger area (more general area).
"What city do you live in?"
The difference between the two of them is how many sets of choices for the answer can you give.
Regards !!