How should a question which quotes a question be punctuated?
Solution 1:
One clue is how this is said. The question mark is a written indication of spoken intonation.
The quoted question is not phrased as a question, with rising intonation. It's said as though its punctuation is
By saying "Where do you belong to," what did they mean?
and there is no reason not to punctuate it that way.
This punctuation reduces the importance of the quoted question. You are not asking that question; you are asking "What did they mean?" It's that sentence which gets the question intonation which the question mark represents.
It can be rationalised, if a rule is wanted, by saying that where a quote runs on into the rest of the sentence, any punctuation at the end of the quote is generally a comma. It's only not a comma where the spoken intonation indicates that it's not.
This is how a question mark can appear in a sentence like
What did they mean by saying "Where do you belong to?"
Both the "inner" question and the "outer" question end in the same place, and both need a question mark. In this case, there's a convention that punctuation is not duplicated and it's the inner question which prevails. Again, how that sentence is spoken provides a clue because the intonation of belong to is the same no matter where the question mark is placed (or even how many there are):
What did they mean by saying "Where do you belong to?"
What did they mean by saying "Where do you belong to?"?
What did they mean by saying "Where do you belong to"?
All of those sentences are pronounced the same, but only the first really makes sense visually, which is where the convention comes in.
If you do in fact pronounce the first and third differently, then you get to decide which you use. It's entirely possible that the pronunciation is context-dependent, in which case the punctuation is, too.
I suppose the same goes for a quoted question in the middle of a sentence. If you pronounce your sentence with a question intonation on the quoted question itself as well as the entire thing, then it may be appropriate to put a question mark there.
Solution 2:
Two question marks is correct here: By saying "Where do you belong to?" what did they mean? The question mark embedded in the third-sentence question functions as the terminal punctuation for that sentence, so you have punctuated it correctly. Your fourth sentence is correctly punctuated, too. Nice job!😊
Source: The Gregg Reference Manual, Tribute Edition
At the end of a sentence, an exclamation point goes inside the closing quotation mark when it applies only to the quoted material.
His first question was, "How long have you worked here?" (Quoted question at the end of a statement.)
Garland still ends every sales meeting by shouting, "Go get 'em!" (Quoted exclamation at the end of a statement.)
At the end of a sentence, a question mark or an exclamation point goes outside the closing quotation mark when it applies to the entire sentence.
When will she say, for a change, "You did a nice job on that"? (Quoted statement at the end of a question.)
Stop saying "Don't worry"! (Quoted statement at the end of an exclamation.)
Did Billy Wilder actually say that the composer had "Van Gogh's ear for music"? (Quoted phrase at the end of a question.)
I can't believe anyone in their real-estate agency could have approved an ad containing a reference to "floorless workmanship"! (Quoted phrase at the end of an exclamation.)
If a sentence ends with quoted material and both the sentence and the quoted material require the same mark of punctuation, use only one mark – the one that comes first.
Have you seen the advertisement that starts, "Why pay more?" (Quoted question at the end of a question.) Not: . . . "Why pay more?"?
Have you had a chance to read "Who Pays the Bill?" (Not: . . . "Who Pays the Bill?"?)
Let's not panic and yell "Fire!" (Quoted exclamation at the end of an exclamation.)
Did you say, "I'll help out"? Why did Mark ask, "Will Joe be there?"
Who yelled, "Watch out!" (Not: Who yelled "Watch out!"?)
I thought her letter said she would arrive "at 10 p.m." (Not: . . . "at 10 p.m .".)
Hope this helps! 😊