The main purpose of a question mark is to indicate that a sentence is a question. Direct questions often (but not always) begin with a wh- word (who, what, when, where, why).
Examples:
In addition, a question sentence can be constructed by beginning the sentence with auxiliary or modal verb.
Examples:
Sometimes we have an enquiring tone while saying declarative sentence. In writing, question mark at the end of declarative sentence sets the same tone of question in the statement. This is the way to express surprise, doubt and disbelief.
Examples:
When a sentence is a question, the question mark goes at the very end and serves as the terminal punctuation mark. However, when it is used with other punctuation marks such as quotation marks, parenthesis or brackets it is used where it applies. This means, if the information enclosed in these punctuation marks is additional information and not a question itself then it will be placed at the end of sentence not inside them. However, if the information enclosed within the parenthesis or brackets itself is a question then question mark will be placed in them.
Examples:
When you have a question mark that applies to both the quoted phrase and the rest of the sentence, just use one question mark.
Examples:
Indirect questions never take question mark and period is used at the end of the sentence. Indirect questions are asked as declarative sentences.
Examples:
Sometimes question has an element of surprise, shock or excitement and in writing to convey this tone in question, exclamation mark can be used.
Examples: