What is the difference between what and which?
For example, what is the difference between the following sentences?
What is correct?
Which is correct?
Which and what have different meanings. Which is "used in questions to ask somebody to be exact about one or more people or things from a limited number."
For example, you ask "What name to give to your son do you prefer?" because there are many possible names to give to a baby, including the ones in other languages.
Suppose instead that you are talking to somebody who is telling that his wife prefers Michael, her mother prefers Andrew, and his mother likes Alberto. If you ask him "Which name do you prefer?" you are asking him the name he prefers between those three; if you ask him "What name do you prefer?" you are asking him the name he prefers, not excluding any other name that is not Michael, Andrew, or Alberto.
In your case, "Which is correct?" could be asked when the person who is talking to you said, for example, "You could do this or that." Your question is asking "Between this and that, what is correct?"
What is used when you are asking a question that can have an unlimited number of possible answers.
What is your name? You can receive any answer!
Which is used when the options for the answer are limited.
Which one is the most beautiful? The red or the yellow? You can receive only two answers.
'What' stands as the subject and 'which' is the object of the sentence, also 'which' can stands as subject of the which clause that replace the whole clause of the previous sentence. 'What' is used to ask an unknown thing while 'which' means a choice among several things.