The role of the question mark is to end a question, even when one question interrupts or comes after a statement.
I spoke to her— don't you remember?—and she still refused to come.
No doubt Mailani thought she was doing the right thing, but don't you agree she was wrong?
An exception to this rule occurs when the question is followed by a phrase or clause that modifies it. Then, put the question mark at the end of the statement.
How could the mother be so certain of the driver's identity, considering the shock she must have felt at seeing her daughter lying in the road?
Commas and periods with question marks
After a question mark, don't use a period or comma, even if the sentence would normally call for one. Too much punctuation can confuse the reader, as in the following examples.
Later Kevin understood what Gretchen meant when she asked, “ Why me?”
NOT Later Kevin understood what Gretchen meant when she asked, “ Why me?”.
“Do you want to go?” Patty asked.
NOT “Do you want to go?”, Patty asked.
Questions ending with an abbreviation are an exception: Was it at precisely 4 A. M.?
Question marks with quotation marks
If the material being quoted is a question, put the question mark inside the quotation marks.
“ Do you think I'll get the job?” Susannah asked.
David looked around and asked, “ Who can speak for this man?”
If the quotation is not a question, put the question mark outside the quotation marks. If the quoted material would normally end with a period, drop the period.
Who said, “All that glitters is not gold” ?
NOT Who said, “All that glitters is not gold.” ?