There is little difference of meaning between which and what.
- Which/what is the largest continent in the world?
- Which/what train did you come on?
Which is preferred when the speaker has a limited number of choices in mind.
- We have got white and brown bread. Which will you have?
- Which colour do you want – red, pink, blue or purple?
When the speaker is not thinking of a limited number of choices, what is used.
- What is your telephone number? (NOT Which is your phone number?)
- What language do they speak in Chile? (More natural than Which language …)
Before nouns, which and what can be used to ask questions about both people and things.
- Which teacher do you like best?
- What writers do you like?
- Which colour do you want – red or brown?
When these words are used as pronouns, without nouns immediately after them, we use who, not which, for people.
- Who is your favourite writer? (NOT Which is your favourite writer?)
- Who won – Alan or Peter? (NOT Which won …)
However, which can be used in questions about people’s identity, and what can be used to ask about people’s jobs and functions.
- ‘Which is your boy?’ ‘The one blue shirt.’
- ‘What is your husband?’ ‘He is a doctor.’