I'll use MaxB's examples and labels:
A. What is your first and last name?
B. What is your first and last names?
C. What are your first and last name?
D. What are your first and last names?
I agree with MaxB that "D" is grammatical (as ma8 points out, "D" is obviously correct if we are asking about multiple first and last names, for example in a question addressed to multiple people) and "B" is ungrammatical.
"your first and last name"
It certainly seems to be the case that people say things like "first and last name", using the singular noun "name" rather than the plural noun "names". This trend is clearer if we use another possessive pronoun, since "your" can be plural or singular:
The Google Ngram Viewer indicates that in 2008, "his first and last name" was a bit more common than "his first and last names" (although they look close), "my first and last name" was more common than "my first and last names", and "her first and last name" was more common than "her first and last names".
C. What are your first and last name?
I disagree with MaxB's answer in that I don't think it's correct to characterize "C" as "ungrammatical". As MaxB points out, it can be interpreted "your first name and last name" with ellipsis of the first "name".
This structure seems to be used in published works: here are a few examples taken from Google Books of "a first and last name" being used as a plural noun phrase:
And of course you can find many examples online with a simple Google search.
Note that people say things like "both my first and last name", which I think would have to take plural verb agreement.
However, constructions like this do seem to be somewhat controversial, judging by the answers to the following question: "Both the first and the last [plural]" vs. "both the first and the last [singular]"
D. What are your first and last names? (said to a single person)
It does seem that it may be more common to use "first and last names" rather than "first and last name" when there is a following verb that takes plural agreement. The Google Ngram Viewer gives the following frequencies for "first and last name(s)" followed by "are" or "is" (as shown by the unexpected frequency of "first and last names is", there seem to be some false hits along the lines of "the importance of first and last names is", "compound names consisting of first and last names are", "the letters in his first and last name are", but I don't think those affect the result):
I don't agree with Hugh's answer because I think the frequencies of "is first and last" and "are first and last" are unlikely to be similar to the frequencies of "is your first and last name(s)" and "are your first and last name(s)".
A. What is your first and last name?
I'm not sure if I agree with MaxB's statement that "A is the right choice if you only need one full name", or Nick Uva's suggestion that "first and last name" can be interpreted as a "collective noun".
The only sense in which I'm sure it would be grammatical for me is unlikely to be encountered in practice: "The name that you had from the start and that you will continue to have till the end" (as in the sentence "That was the first and last time my mother yelled at me").
I would be more inclined to interpret it as somehow being an elliptical version of a question like "What is your first name, and what is your last name?"
I found the following bits of dialogue from novels that may help illustrate my point:
-
“Emergency operator, what is your name and your problem?”
(Gargoyles in the Mist, by Jonathan Saville, 2011)
-
“Tell me child what is your name and age?”
(In the Moonlight, by Sarah Helton, 2011)
Neither of these seems to have been edited very well, if at all, but I think that's irrelevant to the point I'm trying to make: that people do in fact sometimes use "What is X and Y" in situations where it seems unlikely to me that the coordinated noun phrases "X and Y" can be interpreted as referring to some single thing.
That said, I guess it does seem possible that this is a situation where "your first [name] and last name" is treated as an "X and Y" coordination that takes singular agreement, as discussed in Singular verb after two noun phrases joined by "and" that can be thought of as a single thing.
There is another, even more relevant question that I upvoted, but that unfortunately has no answer: "What is your name and height" or "What are your name and height"