The important thing to remember when you're writing is that the inverted question mark (or exclamation) goes at the beginning part of the question (or exclamation), not at the beginning of the sentence if the two are different. See these examples: